· via Google AI blog
Google's Gemini API adds Tool Retrieval preview to load tool schemas on demand
Google's Tool Retrieval preview in the Gemini Interactions API lets agents defer tool parameter schemas and load them on demand, reducing input tokens and keeping tool selection accurate as libraries grow.

Google has launched Tool Retrieval in preview in the Gemini API, a feature that lets agents hold their full tool libraries in reserve and fetch parameter schemas on demand when a task calls for them. According to a November 19 post on the Google AI blog by Nora Kassner, a research scientist at Google DeepMind, the feature targets a scaling problem in agentic applications: when an agent is wired to dozens or even hundreds of tools, sending every complete parameter schema with each request bloats input tokens, slows responses, and makes it harder for the model to choose the right tool as the number of candidates grows.
How it works
Developers turn the feature on by adding a tool_search tool to a request and setting defer_loading: true on the tools they want to hold back. The model still sees the name and description of every deferred tool, so it knows what exists, but the parameter schemas stay out of context. When the model decides it needs a function, it requests that tool by name, the API loads the full schema, and the model emits the function call — all inside a single request.
Google says there is no index to build or host, because the search runs on the company's servers. The only changes to developer code are the new tool declaration and a flag on the deferred tools, and heavily used tools can stay declared from the start while the rest are deferred.
Each retrieval is recorded in the interaction's steps — as a tool_search_call, a matching tool_search_result, and the resulting function_call — which Google says makes it easier to see which tools the model considered when debugging tool names or descriptions.
Caching and MCP support
Tool Retrieval is designed to remain compatible with prefix caching. Deferred schemas stay out of the start of the prompt, and schemas the model loads are appended later in the conversation, so the cached prefix remains stable across turns.
The feature also extends to remote MCP servers in the Gemini API. Setting defer_loading: true on an mcp_server tool defers every tool that server exposes, so developers can connect a large server without enumerating its tools one by one.
A client-side option
Teams that run their own tool registry, embedding index, or per-user permission filter can execute retrieval themselves. Declaring tool_search with execution: "client" and defining custom search parameters puts the lookup in the application's hands, at the cost of one extra round trip per search. Because tools no longer need to be declared upfront, new ones can also be introduced mid-conversation — for instance, when a user connects a new integration.
Pricing and model support
According to Google, Tool Retrieval carries no separate charge: input and output tokens are billed at the model's standard rates. Enabling tool_search adds a small, fixed block of input tokens, and each schema the model loads is billed as input for the rest of the conversation, the same as an upfront declaration. Google frames the trade-off plainly — you save when the schemas you never load outweigh the ones you do — and the company expects that balance to favor savings for large libraries. Google advises developers to measure the effect against their own traffic.
The feature is available in the Interactions API and works with Gemini 3.6 and later models, including all Gemini 4 models.
Why it matters
Tool selection is becoming a real constraint on agent quality as integrations multiply. Every function a model can call makes the prompt larger and the choice harder, and the spread of MCP servers means tool counts are climbing quickly. Tool Retrieval reframes function calling as an information-retrieval problem: the model reasons over lightweight summaries and pulls in detail only when needed, much as retrieval-augmented generation handles documents.
The design also keeps adoption costs low — no infrastructure to run, no cache invalidation, no new billing line — which makes it practical for teams with existing agents. The counterweights are a small fixed token overhead and per-load billing, so Google's advice to test against real traffic before deferring an entire library is worth following.
- #gemini
- #ai-agents
- #function-calling
- #api