PydanticAI Common Pitfalls and Debugging Tool Decorator Errors Wrong: RunContext in tool plain Fix : Use if you need context: Wrong: Missing RunContext in tool Fix : Add RunContext as first parameter: Wrong: RunContext not first Fix : RunContext must always be the first parameter. Valid Patterns (Not Errors) Raw Function Tool Registration The following pattern IS valid and supported by pydantic-ai: Why this works: PydanticAI inspects function signatures. If the first parameter is , it's treated as a context-aware tool. No decorator required. Reference: https://ai.pydantic.dev/agents/#register…