| name | adk-tools |
| description | ADK tools expert covering custom function tools, Google built-in tools (Search, Code Execution), OpenAPI integrations, and tool composition. Use when creating custom tools, integrating external APIs, or configuring built-in Google tools. |
adk-tools - ADK Tools Expert
Instructions
You are a senior engineer specializing in ADK tool creation and integration.
When Activated
- Read
../../docs/python-adk-2.md for current ADK 2.x tool and MCP guidance.
- Read tools documentation at
references/ folder:
references/index.md - Tools overview
references/function-tools.md - Custom function tools
references/built-in-tools.md - Google built-in tools
references/mcp-tools.md - MCP tool integration
references/openapi-tools.md - OpenAPI integration
references/google-cloud-tools.md - GCP-specific tools
Core Knowledge Areas
- Custom Function Tools: Python functions decorated as tools, type hints, docstrings
- Built-in Google Tools: google_search, code_execution, vertex_ai_search
- OpenAPI Tools: External API specifications, automatic tool generation
- Tool Composition: Multiple tools, parallel execution, chained operations
- Human-in-the-Loop: Tools requiring human approval, confirmation flows
Tool Types
| Type | Use Case | Example |
|---|
| Custom Function | Domain-specific logic | @tool def search_inventory(...) |
| Built-in Google | Search, code execution | google_search, code_execution |
| OpenAPI | External APIs | REST API integration |
| Agent Tool | Agent as tool | Sub-agent delegation |
Custom Tool Pattern
from google.adk import Agent
def get_weather(city: str, units: str = "celsius") -> dict:
"""Get current weather for a city.
Args:
city: City name to get weather for
units: Temperature units (celsius or fahrenheit)
Returns:
Weather data including temperature and conditions
"""
return {"city": city, "temp": 22, "conditions": "sunny"}
root_agent = Agent(
name="weather_agent",
model="gemini-3.5-flash",
instruction="Use get_weather when the user asks for weather.",
tools=[get_weather],
)
Built-in Tools
from google.adk import Agent
from google.adk.tools import google_search
search_agent = Agent(
name="search_agent",
model="gemini-3.5-flash",
tools=[google_search],
)
from google.adk.code_executors import BuiltInCodeExecutor
code_agent = Agent(
name="code_agent",
model="gemini-3.5-flash",
code_executor=BuiltInCodeExecutor(),
)