ADK Tools and Integrations
Use this sub-skill when a user asks to add, wrap, authenticate, expose, or debug tools and integration toolsets in an ADK Python agent.
Route Here
- Bind Python functions with
FunctionTool,LongRunningFunctionTool,ToolContext,request_input, or explicittool_context.request_confirmation(). - Build custom
BaseToolorBaseToolsetclasses, filter/prefix toolsets, or close toolset resources safely. - Wrap agents as tools with
AgentTool, delegate withTransferToAgentToolortransfer_to_agent, or diagnose tool-name routing issues. - Add auth with
AuthConfig,AuthCredential,AuthenticatedFunctionTool, OpenAPI auth helpers, MCP auth, or credential request flows. - Configure MCP, OpenAPI, API Hub, Google API, Application Integration, BigQuery/Bigtable/Spanner/Pub/Sub/Data Agent/Toolbox/Slack/A2A integrations.
- Diagnose missing optional extras such as
google-adk[mcp],google-adk[extensions],google-adk[gcp],google-adk[tools],google-adk[a2a],google-adk[toolbox], orgoogle-adk[db].
Route Elsewhere
- Agent constructor field placement,
model,instruction, schemas, and callback basics: useagent-construction. - CLI command usage, app discovery, local servers, deployment, and YAML config loading: use
cli-configuration-deployment. Runner,App, session/memory/artifact persistence, plugins, telemetry, and service lifecycles: useruntime-services.- Workflow graph nodes,
Workflow, HITL node resume, joins, and dynamic graph routing: useworkflow-orchestration. - Modifying ADK repository source, style, tests, docs, or samples: use
repo-development.
Quick Start
- Prefer bare callables for simple tools; wrap with
FunctionTool(func=..., require_confirmation=...)only when you need confirmation or explicit tool object behavior. - Add
tool_context: ToolContextonly when the tool needs state, artifacts, credentials, confirmation, transfer actions, or workflow node helpers; the parameter must be namedtool_context. - Return JSON-serializable dictionaries for structured tool results; return
{"error": "..."}when the model should see a recoverable tool failure. - Use
LongRunningFunctionToolfor work that returns pending status or pauses for external input; do not retry the same long-running call unless the returned event requests it. - Treat MCP, cloud, database, and A2A helpers as optional-extra surfaces; first run the bundled inspection script before assuming an import is available.
pythonfrom google.adk import Agent from google.adk.tools import FunctionTool, ToolContext def transfer_funds(amount: float, recipient: str, tool_context: ToolContext): """Transfer funds after ADK collects confirmation.""" return {"status": "scheduled", "amount": amount, "recipient": recipient} root_agent = Agent( name="finance_agent", model="gemini-3.5-flash", instruction="Use tools for account operations and explain the result.", tools=[FunctionTool(func=transfer_funds, require_confirmation=True)], )
References
- API reference — public classes, constructors, auth models, tool context methods, integration toolset families, optional extras, and local validation checks.
- Workflows — recipes for function tools, confirmation, long-running tools, MCP, OpenAPI, Google API/cloud integrations, A2A exposure, and safe fallback planning.
- Troubleshooting — fixes for missing extras, credentials, auth config, schema conversion, MCP sessions, cloud clients, confirmation confusion, and swallowed tool errors.
- Inspection script — no-network diagnostic that prints installed tool signatures and reports optional-extra availability without failing the whole run.
Tooling Checklist
- Tool names are stable, unique, and derived from clear function/class names; descriptions come from docstrings or explicit
BaseTooldescriptions. - Function parameters are typed with JSON-schema-friendly types; Pydantic models are accepted for structured arguments but should be validated before side effects.
ToolContextis used for state, credentials, confirmation, memory/artifacts, transfer actions, or node execution; it is not exposed to the model as a normal argument.- Sensitive operations require either
require_confirmation=Trueor explicittool_context.request_confirmation()handling. - Integration code documents which extra and which credential source are required, and includes a local import/help probe before any network or credential-dependent call.
- Tool exceptions are either intentionally propagated or translated by
on_tool_error_callback; recoverable domain failures return a function response such as{"error": "..."}.


