Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add existential-birds/beagle --skill pydantic-ai-tool-systemgit clone --depth 1 https://github.com/existential-birds/beagleWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/existential-birds/beagle/pydantic-ai-tool-system)<a href="https://agentmods.dev/skills/existential-birds/beagle/pydantic-ai-tool-system"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/pydantic-ai-tool-system/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/existential-birds/beagle/pydantic-ai-tool-system"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/pydantic-ai-tool-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.01349 |
| Opus 5 | $0.00022 | $0.00674 |
| Sonnet 5 | $0.00009 | $0.00270 |
| Haiku 4.5 | $0.00004 | $0.00135 |
Grade A, and why
pydantic-ai-tool-system scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PydanticAI Tool System
Tool Registration
Two decorators based on whether you need context:
from pydantic_ai import Agent, RunContext
agent = Agent('openai:gpt-4o')
# @agent.tool - First param MUST be RunContext
@agent.tool
async def get_user_data(ctx: RunContext[MyDeps], user_id: int) -> str:
"""Get user data from database.
Args:
ctx: The run context with dependencies.
user_id: The user's ID.
"""
return await ctx.deps.db.get_user(user_id)
# @agent.tool_plain - NO context parameter allowed
@agent.tool_plain
def calculate_total(prices: list[float]) -> float:
"""Calculate total price.
Args:
prices: List of prices to sum.
"""
return sum(prices)
Critical Rules
- @agent.tool: First parameter MUST be
RunContext[DepsType] - @agent.tool_plain: MUST NOT have
RunContextparameter - Docstrings: Required for LLM to understand tool purpose
- Google-style docstrings: Used for parameter descriptions
Gates (verify in the file, not from memory)
- Decorator matches signature — If the first parameter is
RunContext[...], the decorator must be@agent.tool(not@agent.tool_plain). Pass: the samedefline’s decorator stack includes@agent.tool, and the first parameter is typedRunContext[...]. - Plain tools — With
@agent.tool_plain, the parameter list must not includeRunContext. Pass: a quick scan of the signature shows noRunContext. - Docstring for the model — Non-empty docstring; if the tool has parameters, describe them (Google
Args:or Sphinx:paramwhen usingdocstring_format='sphinx'). Pass: each parameter in the signature is mentioned in the docstring body.
Docstring Formats
Google style (default):
@agent.tool_plain
async def search(query: str, limit: int = 10) -> list[str]:
"""Search for items.
Args:
query: The search query.
limit: Maximum results to return.
"""
Sphinx style:
@agent.tool_plain(docstring_format='sphinx')
async def search(query: str) -> list[str]:
"""Search for items.
:param query: The search query.
"""
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 216 lines · 44 tokens per session scan A 2b91d4f3181c
pydantic-ai-tool-system is a skill published in the GitHub repository existential-birds/beagle (80 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,349 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
detect-framework
Detect Python agent frameworks from code imports and map them to Omnigent executor types. Load when the user has existing agent code to integrate.
cross-sdk-parity
Keep TypeScript and Python SDK behavior, generated client usage, public API naming, and docs examples aligned. Use when a change affects both SDKs, when generated client pins move, when comparing TS/Python behavior, or when a backend API contract changed. Do not use for single-language internal-only changes.
python-providers
Create, modify, test, or package Python provider adapters under python/providers, including framework-specific dependencies, public imports, type inference, and provider metadata. Use for Python provider work only; use python-sdk for core SDK changes.
python-release
Handle Python SDK release, build, bump, packaging metadata, PyPI client pin, uv.lock, nox/build workflow, and publish verification changes. Use for Python release process work or dependency pin bumps; do not use for ordinary Python feature implementation.
agentic-development
Build AI agents with Pydantic AI (Python) and Claude SDK (Node.js).
aws-dynamodb
AWS DynamoDB single-table design, GSI patterns, SDK v3 TypeScript/Python.