Gemini API adds preview support for on-demand tool retrieval
Google has introduced Tool Retrieval, now available in preview through the Gemini Interactions API. The feature allows agents to keep a large tool library available without including every tool’s full parameter schema in each request. Gemini can see the names and descriptions of deferred tools, while their schemas are loaded only when a task requires them. The intended benefits are lower input-token use, reduced latency and more accurate tool selection as the number of tools grows.
Developers enable the feature by adding a tool_search tool and setting defer_loading: true for selected functions. Gemini requests a needed tool by name, the API supplies its schema, and the model then makes the function call within the same request. These operations appear in interaction.steps for inspection. There is no index to build or host, and frequently used tools can remain loaded upfront. The feature also supports remote MCP servers and prefix caching.
A client-side mode is available for applications with their own registries, embedding indexes or permission filters, although each search adds a round trip. Tool Retrieval has no separate fee; standard token rates apply. It works with Gemini 3.6 and later models, including all Gemini 4 models, in the Interactions API.
Written by Sakhanda Wire AI from reporting by Google AI. Facts, quotes and full context are in the original article below.