“function-tools”
Handling Tool Errors and Raising Recoverable Exceptions to the LLM
What the model actually sees when a tool fails, how to distinguish recoverable from terminal errors, writing error messages that produce a correct retry, sanitising output, and partial success patterns.
Synchronous vs Asynchronous Tool Implementations: When to Use async def
Blocking tools stall the event loop and your latency budget. How ADK executes sync and async tools, when async actually helps, fan-out with gather, CPU-bound work, timeouts and cancellation, and a decision guide.
Pydantic BaseModels as Tool Arguments: Enforcing Complex Validations
Passing Pydantic models into ADK tool signatures: how nested schemas reach the model, field constraints and validators, error messages the model can repair from, and separating the wire schema from your domain model.
Defining Function Tools in ADK: Type Hints, Docstrings, and Validation
How a plain Python function becomes an ADK tool — what the schema generator reads, the required-vs-optional rules, docstring structure as the model's contract, return conventions, and the failure modes that make tools misbehave.