Available on crate feature
tools only.Expand description
Tool system and built-in tools.
Give agents capabilities beyond conversation:
FunctionTool- Wrap async functions as toolsGoogleSearchTool- Web searchExitLoopTool- Control loop agentsMcpToolset- MCP server integration with themcpfeatureCodeTool/PythonCodeTool/JavaScriptCodeTool/MontyPythonCodeTool- Code execution with thecode-toolsfeature (included infull); the embedded live paths needcode-embedded-js/code-embedded-python
Available with feature: tools
Modules§
- builtin
- Built-in tool wrappers for Gemini, OpenAI, and Anthropic hosted tools.
- code_
execution code - Code execution tools for ADK agents.
- mcp
mcp - Model Context Protocol (MCP) clients, server SDK re-export, catalog APIs, elicitation, tasks, HTTP transport, and dynamic local-server management.
- toolset
- Toolset combinators: basic, filtered, merged, and prefixed toolsets.
Structs§
- AdkError
- Unified structured error type for all ADK-Rust operations.
- Agent
Tool - AgentTool wraps an Agent to make it callable as a Tool.
- Agent
Tool Config - Configuration options for AgentTool behavior.
- Anthropic
Bash Tool20241022 - Anthropic native bash tool declaration for the
bash_20241022version. - Anthropic
Bash Tool20250124 - Anthropic native bash tool declaration for the
bash_20250124version. - Anthropic
Text Editor Tool20250124 - Anthropic native text editor declaration for
text_editor_20250124. - Anthropic
Text Editor Tool20250429 - Anthropic native text editor declaration for
text_editor_20250429. - Anthropic
Text Editor Tool20250728 - Anthropic native text editor declaration for
text_editor_20250728. - Auto
Decline Elicitation Handler - Default handler that declines all elicitation requests.
- Basic
Toolset - A simple toolset that wraps a static list of tools with optional filtering.
- Bypass
Builtin Tool - A built-in tool converted into a function-calling tool so it can coexist with custom function tools under the Gemini Interactions API.
- Code
Tool - A tool that executes code through language-specific pipelines.
- Exit
Loop Tool - A control-flow tool that signals a loop agent to exit its iteration cycle.
- Filtered
Toolset - A toolset wrapper that filters tools from an inner toolset using a predicate.
- Frontend
Code Tool - Container-backed frontend code execution tool.
- Function
Tool - A tool created from an async Rust function.
- Gemini
Code Execution Tool - Gemini built-in code execution tool.
- Gemini
Computer UseTool - Gemini built-in computer use tool declaration.
- Gemini
File Search Tool - Gemini built-in file search tool.
- Google
Maps Context - Contextual Google Maps location used by Gemini retrieval config.
- Google
Maps Tool - Gemini built-in Google Maps grounding tool.
- Google
Search Tool - GoogleSearch is a built-in tool that is automatically invoked by Gemini models to retrieve search results from Google Search. The tool operates internally within the model and does not require or perform local code execution.
- Java
Script Code Tool - Embedded JavaScript code execution tool.
- Load
Artifacts Tool - A tool that loads binary artifacts by name and returns their content.
- McpHttp
Client Builder - Builder for HTTP-based MCP connections.
- McpServer
Manager - Manages the full lifecycle of multiple local MCP server child processes.
- McpTask
Config - Configuration for MCP task-based execution
- McpToolset
- MCP Toolset - connects to an MCP server and exposes its tools as ADK tools.
- Merged
Toolset - A toolset that merges tools from multiple inner toolsets into one.
- Monty
Python Code Tool - Embedded Python code execution tool backed by the Monty interpreter.
- Monty
Python Code Tool Builder - Configures a
MontyPythonCodeTool: OS-access grants, host functions, and limits are forwarded toMontyExecutorBuilder; the terminal methods select the mode. - OAuth2
Config - OAuth2 configuration for MCP authentication
- OpenAI
Apply Patch Tool - OpenAI apply_patch tool declaration.
- OpenAI
Approximate Location - Approximate user location for OpenAI web search.
- OpenAI
Code Interpreter Tool - OpenAI hosted code interpreter tool.
- OpenAI
Computer UseTool - OpenAI computer use tool declaration.
- OpenAI
File Search Tool - OpenAI hosted file search tool.
- OpenAI
Image Generation Tool - OpenAI hosted image generation tool.
- OpenAI
Local Shell Tool - OpenAI local shell tool declaration.
- OpenAI
McpTool - OpenAI remote MCP tool declaration.
- OpenAI
Shell Tool - OpenAI managed shell tool declaration.
- OpenAI
WebSearch Tool - OpenAI hosted web search tool.
- Prefixed
Toolset - A toolset wrapper that prefixes all tool names from an inner toolset.
- Python
Code Tool - Container-backed Python code execution tool.
- Resource
- A known resource that the server is capable of reading (spec
Resource). - Resource
Template - A template description for resources available on the server (spec
ResourceTemplate). - Simple
Tool Context - A lightweight
ToolContextwith sensible defaults for non-agent callers. - Stateful
Tool - A generic tool wrapper that manages shared state for stateful closures.
- UrlContext
Tool - UrlContext is a built-in tool that is automatically invoked by Gemini models to fetch and analyze content from URLs. The tool operates internally within the model and does not require or perform local code execution.
- WebSearch
Tool - WebSearch is a built-in tool for Anthropic Claude models that enables server-side web search. The model searches the web internally and returns results as ServerToolUse / WebSearchToolResult content blocks.
- WebSearch
User Location - Approximate user location for Anthropic’s web search tool.
Enums§
- Gemini
Computer Environment - Target environment for Gemini computer use.
- McpAuth
- Authentication configuration for MCP connections
- OpenAI
Computer Environment - OpenAI computer use environment.
- Resource
Contents - The contents of a specific resource or sub-resource.
Traits§
- Bypass
Multi Tools Limit - Generalizes the
bypass_multi_tools_limitconversion so any built-in tool can adopt it ergonomically. - Elicitation
Handler - Trait for handling MCP elicitation requests from servers.
- Resource
Notification Handler - Receives resource update notifications from an MCP server.
- Tool
- The core trait for all tools that agents can invoke.
- Tool
Context - Context available to tools during execution.
- Toolset
- A collection of tools that can be resolved dynamically from context.
Functions§
- string_
predicate - Creates a predicate that allows only tools with names in the provided list.
Type Aliases§
- Result
- Convenience alias used throughout ADK crates.
Attribute Macros§
- async_
trait - tool
- Attribute macro that generates a
Toolimplementation from an async function.