Google has launched Tool Retrieval in preview for the Gemini API, addressing token and accuracy challenges that emerge when agents connect to large tool libraries. The feature is available through the Interactions API, according to a November 19 blog post by product manager Lucia Loher and research scientist Nora Kassner.
Tool Retrieval allows developers to defer loading full parameter schemas for functions until the model determines it needs them. While traditional function-calling implementations send complete schemas for every available tool with each request, Tool Retrieval keeps only tool names and descriptions in context initially. When the model decides a specific tool is relevant to the current task, it requests that tool by name, the API loads the full schema, and the model proceeds with the function call—all within a single API request.
Google says the approach is designed to reduce input token counts, lower latency, and preserve tool-selection accuracy as agent tool libraries grow to dozens or hundreds of functions.
Developers enable Tool Retrieval by adding a tool_search tool type to their request and setting defer_loading: true on individual function definitions. The API returns detailed step logs showing which tools the model searched for, making it easier to debug tool selection based on names or descriptions.
The feature is currently available in preview with the Gemini API Interactions API endpoint.
https://blog.google/innovation-and-ai/technology/developers-tools/gemini-api-tool-retrieval