Expand docs/agents/tools.md or create a new docs/agents/tool-authoring.md:
- How @tool generates JSON Schema from type hints
- Required vs optional params
- Async tools
- Tools with side effects (databases, APIs) — idempotency advice
- Tools that return structured data
- Tools with state (class-based tools)
- Error handling in tools
- Testing tools in isolation with pytest
- Registering tools in a central registry
Expand
docs/agents/tools.mdor create a newdocs/agents/tool-authoring.md: