Introducing Tool Retrieval in the Gemini API
- Source
- blog.google
- Date

Context
Google's Gemini API can now hold back the detailed descriptions of an 's tools until the model actually needs one, a feature called Tool Retrieval that is in preview in the Interactions API (Google). Every tool an agent can call comes with a parameter schema, a structured description of the inputs it accepts, and normally every schema is sent with every request. For an agent connected to dozens or hundreds of tools, Google says that adds input and latency and makes the model worse at picking the right tool as the list grows.
With Tool Retrieval, a developer adds a tool_search tool to the request and marks the tools to hold back with defer_loading set to true. The model still sees the name and description of every deferred tool, so it knows what exists, but not their schemas. When it needs one, it asks for it by name, the API loads that schema, and the model calls the function, all inside the same request. Google runs the search on its servers, so there is no index to build, and developers can keep their most-used tools loaded up front and defer the rest. Setting the flag on a remote server, a source that exposes many tools at once, defers every tool that server offers. Teams with their own tool registry or per-user permission rules can run the search in their own app instead, at the cost of one extra round trip per search, and can add tools partway through a conversation. Because deferred schemas stay out of the start of the prompt, the part a provider can cache between turns stays the same.
Whether it saves money depends on the agent. There is no separate charge, but turning on tool search adds a small fixed block of input tokens, and every schema the model loads is billed as input for the rest of the conversation. Savings come when the schemas never loaded outweigh the ones that are, which Google calls the usual case for large tool libraries while telling developers to measure it against their own traffic. The post gives no figures for token savings, latency or tool-selection accuracy. Tool Retrieval works with Gemini 3.6 and later models, including all Gemini 4 models.
- Gemini API Tool Retrieval (preview) keeps deferred tools' names and descriptions in but leaves their parameter schemas out. When the model needs a tool it asks for it by name, and the API loads the schema and the model calls it within the same request.
- Enabling it takes a tool_search tool plus defer_loading: true on tools to hold back; Google suggests keeping frequently used tools loaded and deferring the long tail. Search runs on Google's servers, so there is no index to build or host.
- Deferred schemas stay out of the start of the prompt and loaded ones are appended later, so the cached prompt prefix stays stable across turns. Setting defer_loading on a remote MCP server tool loads every tool that server exposes on demand.
- Tool Retrieval has no separate charge, but tool_search adds a small fixed block of input tokens and each loaded schema is billed as input for the rest of the conversation. Google says savings come when unloaded schemas outweigh loaded ones.
- Teams with their own registry or per-user permission filter can run the search client-side with execution: client, at the cost of one extra round trip per search, and can expose new tools mid-conversation. It works with Gemini 3.6 and later models.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
- token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
- MCP — The Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.
- context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
Checking sign-in…
Loading comments…


