Gemini API Introduces Tool Retrieval Feature in Preview
On November 19, 2026, Google announced the preview launch of Tool Retrieval in the Gemini Interactions API. This feature enables agents to load tool parameter schemas on demand, rather than sending the entire tool library with each prompt. This approach is designed to reduce input token usage and maintain tool selection accuracy as the number of tools increases.
Lucia Loher, Product Manager for the Gemini API, and Nora Kassner, Research Scientist at Google DeepMind, highlighted that sending full parameter schemas for every request can quickly inflate token counts and increase latency. Tool Retrieval allows agents to keep their full tool library ready while only loading the necessary schemas for current tasks.
Functionality of Tool Retrieval
To activate Tool Retrieval, developers need to include a `tool_search` tool in their requests and set `defer_loading: true` for the tools they wish to hold back. The model retains visibility of the names and descriptions of deferred tools, ensuring it knows what is available without loading the parameter schemas until needed. When a tool is required, the model requests it by name, prompting the API to load the full schema within the same request.
This process allows for a streamlined interaction where the model can search for a tool, load its schema, and execute the function all in one API call. The steps involved are recorded in `interaction.steps`, facilitating easy debugging of tool names and descriptions.
Integration and Performance
Tool Retrieval does not require building or hosting an index, as Gemini handles the search on the server side. Developers only need to implement the new tool and set the defer flag. This feature also supports prefix caching, where deferred schemas do not clutter the start of the prompt, maintaining a consistent cached prefix throughout the conversation.
Additionally, Tool Retrieval is compatible with remote MCP servers in the Gemini API. By setting `defer_loading: true` on an `mcp_server` tool, all tools exposed by that server can be loaded on demand, simplifying the integration of large servers without the need to list each tool individually.
Client-Side Retrieval and Pricing
For those maintaining their own tool registries or user permission filters, client-side retrieval can be implemented by declaring the `tool_search` with `
Source: Google AI Blog