Why it matters

Tool design is where most agent quality problems live. Wrong parameter types, unclear descriptions, unsafe operations — all lead to bad agent behavior. Get tools right and agents get much better.

Advertisement

The architecture

Define a tool: annotate a Java method with @Tool, provide description, define parameter schema (name, type, description, required).

ADK auto-generates a JSON schema the LLM sees; when LLM outputs a tool call, ADK dispatches to your method.

Tool call flowTool method@Tool + schemaLLM sees schemadecides to callRunner dispatchesJava method executesDescriptions are crucial: LLM uses them to decide when and how to call tools
Tool integration cycle.
Advertisement

How it works end to end

Description matters enormously. LLM uses descriptions to decide which tool to call. Vague descriptions cause wrong tool selection.

Schema strictness: use enums for known values, tight ranges for numbers. Loose schemas cause invalid calls.

Idempotency: tools that can be called multiple times without harm are safer. Design for retry.

Error handling: tools should return structured errors that the LLM can react to. Silent failures cause bad output.