Skip to main content

Module tool

Module tool 

Source
Available on crate feature tools only.
Expand description

Tool system and built-in tools.

Give agents capabilities beyond conversation:

Available with feature: tools

Modules§

builtin
Built-in tool wrappers for Gemini, OpenAI, and Anthropic hosted tools.
toolset
Toolset combinators: basic, filtered, merged, and prefixed toolsets.

Structs§

AdkError
Unified structured error type for all ADK-Rust operations.
AgentTool
AgentTool wraps an Agent to make it callable as a Tool.
AgentToolConfig
Configuration options for AgentTool behavior.
AnthropicBashTool20241022
Anthropic native bash tool declaration for the bash_20241022 version.
AnthropicBashTool20250124
Anthropic native bash tool declaration for the bash_20250124 version.
AnthropicTextEditorTool20250124
Anthropic native text editor declaration for text_editor_20250124.
AnthropicTextEditorTool20250429
Anthropic native text editor declaration for text_editor_20250429.
AnthropicTextEditorTool20250728
Anthropic native text editor declaration for text_editor_20250728.
BasicToolset
A simple toolset that wraps a static list of tools with optional filtering.
ExitLoopTool
A control-flow tool that signals a loop agent to exit its iteration cycle.
FilteredToolset
A toolset wrapper that filters tools from an inner toolset using a predicate.
FunctionTool
A tool created from an async Rust function.
GeminiCodeExecutionTool
Gemini built-in code execution tool.
GeminiComputerUseTool
Gemini built-in computer use tool declaration.
GeminiFileSearchTool
Gemini built-in file search tool.
GoogleMapsContext
Contextual Google Maps location used by Gemini retrieval config.
GoogleMapsTool
Gemini built-in Google Maps grounding tool.
GoogleSearchTool
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.
LoadArtifactsTool
A tool that loads binary artifacts by name and returns their content.
MergedToolset
A toolset that merges tools from multiple inner toolsets into one.
OpenAIApplyPatchTool
OpenAI apply_patch tool declaration.
OpenAIApproximateLocation
Approximate user location for OpenAI web search.
OpenAICodeInterpreterTool
OpenAI hosted code interpreter tool.
OpenAIComputerUseTool
OpenAI computer use tool declaration.
OpenAIFileSearchTool
OpenAI hosted file search tool.
OpenAIImageGenerationTool
OpenAI hosted image generation tool.
OpenAILocalShellTool
OpenAI local shell tool declaration.
OpenAIMcpTool
OpenAI remote MCP tool declaration.
OpenAIShellTool
OpenAI managed shell tool declaration.
OpenAIWebSearchTool
OpenAI hosted web search tool.
PrefixedToolset
A toolset wrapper that prefixes all tool names from an inner toolset.
SimpleToolContext
A lightweight ToolContext with sensible defaults for non-agent callers.
StatefulTool
A generic tool wrapper that manages shared state for stateful closures.
UrlContextTool
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.
WebSearchTool
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.
WebSearchUserLocation
Approximate user location for Anthropic’s web search tool.

Enums§

GeminiComputerEnvironment
Target environment for Gemini computer use.
OpenAIComputerEnvironment
OpenAI computer use environment.

Traits§

Tool
The core trait for all tools that agents can invoke.
ToolContext
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 Tool implementation from an async function.