News · · 3 min read
Gemini API Tool Retrieval loads agent tools only when needed
Google's Tool Retrieval preview keeps your full tool library on standby and loads each parameter schema only when the model asks for that tool. It is designed to reduce input tokens.
What happened
Google has launched Tool Retrieval in the Gemini API, available in preview in the Interactions API, according to Google. Instead of sending your full tool library in every prompt, you load tool parameter schemas on demand. Google says the feature is designed to reduce input tokens and keep tool selection accurate as your agent scales.
The problem, as Google puts it: when an agent connects to dozens or even hundreds of tools, sending every full parameter schema on every request adds up fast. According to Google, it inflates input token counts, adds latency, and lowers tool-selection accuracy as the candidate list grows.
To switch it on, you add a tool_search tool to your request and set defer_loading: true on the tools you want to hold back. The model still sees the name and description of every deferred tool, so it knows what is available, but the parameter schemas stay out of context. When the model needs a tool, it asks for it by name, the API loads the full schema, and the model calls the function, all inside the same request.
Google's example has the model search for issue_refund, the API load its schema, and the model emit the function_call. All three steps appear in interaction.steps, which Google says makes it easier to inspect which tools the model considered. From there it is normal function calling: your code runs the refund and sends back a function_result.
What it means for you
Agents that connect to many tools carry a lot of schema text, and Google says that is what drives up input tokens and latency. Tool Retrieval lets you keep your most-used tools loaded up front and defer the long tail, as Google describes it.
There is no index to build or host, because Gemini runs the search on the server. Google says it plays well with prefix caching: deferred schemas stay out of the start of the prompt, so the cached prefix stays the same from turn to turn. It also works with remote MCP servers, where setting defer_loading: true on an mcp_server tool means every tool that server exposes is loaded on demand.
If you maintain your own tool registry, embedding index or per-user permission filter, you can declare tool_search with "execution": "client" and define your own search parameters. Google notes that client-side retrieval adds one round trip per search, because your app runs the lookup. Tools do not need to be declared upfront, so you can expose new tools mid-conversation when a user connects an integration.
This is a preview, and the announcement gives no figures for how many tokens you will save. Google says tool_search adds a small, fixed block of input tokens and that each schema the model loads is billed as input for the rest of the conversation. You save tokens when the schemas you never load outweigh the ones you do, and Google's advice is to measure it against your own traffic. Because the model sees only the name and description of a deferred tool before it asks for it, those two lines carry real weight, and interaction.steps is a place to check how the model chose.
Where Tool & Loop fits
Tool Retrieval is a plumbing improvement, and plumbing only matters once the agent has a job to do. Tool & Loop teaches agents that take a job off your list: quote a customer, chase an invoice, cut a video, check their own work. An agent doing any of those jobs has to pick the right tool at the right step, so how you name and describe tools matters.
The news itself is simple. Tool libraries are growing, and Google now offers a way to avoid sending every schema on every request. What you build on top of that is still down to the quality of your agent and the clarity of its tools.
Questions
What is Tool Retrieval in the Gemini API?
It is a preview feature in the Gemini Interactions API that loads tool parameter schemas on demand instead of sending the full tool library in every prompt. Google says it is designed to reduce input tokens and keep tool selection accurate.
How do you turn on Tool Retrieval?
Add a tool_search tool to your request and set defer_loading: true on the tools you want to hold back. The model still sees each deferred tool's name and description, and the API loads the full schema when the model asks for it.
Does it work with MCP servers?
Yes, according to Google. Set defer_loading: true on an mcp_server tool and every tool that server exposes is loaded on demand.
Sources
- Introducing Tool Retrieval in the Gemini API · blog.google, 19 Nov 2026
- Tool & Loop: /, read 20 Nov 2026
Ask for a module, or join the waitlist
Start