Gemini API adds Tool Retrieval preview with deferred tool schema loading
Google introduces a preview of Tool Retrieval in the Gemini Interactions API, allowing agents to defer loading tool schemas on demand, reducing token usage and latency, and supporting Gemini 3.6+ models including gemini-4-hydrogen at standard rates.
Google announced that the Gemini Interactions API now offers a Tool Retrieval preview. The preview lets agents load tool parameter schemas only when needed, cutting input token counts and latency while keeping the full tool library optional.
Developers enable the feature by adding a tool_search tool and setting defer_loading: true on each tool they wish to defer. With defer_loading enabled, the model receives each tool’s name and description but the schema remains out of the prompt until the model explicitly requests it.
Tool Retrieval operates with Gemini 3.6 and later models, covering all Gemini 4 models such as gemini-4-hydrogen. The feature incurs no separate charge; input and output tokens are billed at the standard model rates, with a small fixed token block for the tool_search call and each loaded schema counted as input.
By keeping deferred schemas out of the prompt prefix, prefix caching stays effective across turns, and the on‑demand loading reduces overall token consumption and response latency.
The preview also supports remote MCP servers; setting defer_loading on an mcp_server tool loads all exposed server tools on demand. Client‑side retrieval is possible by declaring tool_search with "execution": "client", which adds one extra round‑trip per search.
The API returns interaction steps—including tool_search_call, tool_search_result, and function_call—in a single request, simplifying debugging of tool selection. Example code demonstrates using gemini-4-hydrogen with a deferred issue_refund function among more than 50 other deferred functions. Developers can preload frequently used tools and defer the long‑tail of rarely used tools.