Gemini API adds Tool Retrieval: agents can hold hundreds of tools and load schemas only when needed
Synopsis
Gemini API has launched Tool Retrieval in preview in the Interactions API, letting an agent keep its full tool library on standby and load parameter schemas only when the current task needs them. Previously every request sent the full parameter schema of every tool, which inflated input tokens, added latency and lowered tool-selection accuracy as the candidate list grew. With it on, the model still sees the name and description of each deferred tool, asks for one by name when needed, and the API loads the full schema and completes the function call inside the same request.
Interpretation
Gemini API adds Tool Retrieval, so an agent can leave the parameter schemas of many tools on standby and bring them into context only when the current task uses them. Previously, when an agent connected to dozens or even hundreds of tools, every request sent each tool's full parameter schema, inflating input token counts, adding latency and lowering tool-selection accuracy as the candidate list grew. The stated mechanism is that deferred tools still expose their name and description to the model while their parameter schemas stay out of context, so the model knows what is available without paying schema tokens for every tool.
It is turned on by adding a tool_search tool to the request and setting defer_loading: true on the tools to hold back. When the model needs a tool it asks for it by name, the API loads the full schema, and the model emits the function call, all within the same API call. In the official example the model searches for issue_refund, the API returns its schema, and the model emits a function call carrying order_id and amount; the three steps appear in order in interaction.steps, which helps debug tool names or descriptions.
Search runs on Gemini's servers, so developers build or host no index and the only code changes are the new tool and the deferral flag. Frequently used tools can stay loaded up front while the long tail is deferred; deferred schemas stay out of the start of the prompt and loaded schemas are added later in the conversation, so the cached prefix stays the same from turn to turn. Tool Retrieval also works with remote MCP servers in the Gemini API: setting defer_loading: true on an mcp_server tool loads every tool that server exposes on demand, without listing them one by one.
Perspective
The feature is available in preview in the Interactions API and works with Gemini 3.6 and later models, including all Gemini 4 models; the official guidance is to measure savings against your own traffic.
No quantitative figures for tool-selection accuracy or latency improvement are given, and the note states that savings depend on unloaded schemas outweighing loaded ones, so they must be measured on your own traffic; client-side retrieval adds one round trip per search.
