Why it matters

Tools are what let agents do things. Well-designed tools enable powerful agents; poor ones frustrate.

Advertisement

The architecture

Function tool: decorate function; type hints + docstring become schema.

Class-based tool: for stateful tools or complex config.

ADK tool definitionFunction tool@tool decoratorClass toolfor complex configAuto-schemafrom types + docstringDocstrings become descriptions; type hints become schemas; keep both accurate
Tool definition patterns.
Advertisement

How it works end to end

ToolContext: injected into tools; access session state, artifacts.

Async tools: agents can call async functions natively.

Long-running tools: LongRunningFunctionTool for tools taking minutes.

Built-in tools: web search, code execution, RAG search included.