Google's Tool Retrieval preview can cut input costs for a Gemini agent with dozens of tools or several MCP servers, but Google says agents under 20 stable tools should keep static loading. It runs only on the v1beta Interactions API, and each search adds a billed model call. Test it on your largest toolsets now. Keep it out of production until it reaches general availability.
Google announced Tool Retrieval on November 19, 2026 as a preview in the Gemini Interactions API. Tool retrieval is a mode where the model sees only each tool's name and a short description, asks for the tools it needs by name, and the API loads their full parameter schemas mid-request. Anthropic and OpenAI already ship the same pattern under the name "tool search," so this is Google catching up on a mechanism platform teams on Gemini have had to build themselves.
What Tool Retrieval Changes in a Gemini Agent
Tool Retrieval moves tool schemas out of the default prompt and charges for them only when the model loads them. You add a tool_search tool to the request and set defer_loading: true on every function you want held back. According to the Tool Retrieval documentation, a deferred tool adds only its name and short_description (or the first sentence of its description) to total_input_tokens; its parameter schema is not billed until the model loads it.
The problem it targets is real. Google's documentation says "a few dozen function declarations can consume tens of thousands of tokens on every request, and tool selection accuracy drops as the candidate list grows." Anthropic's tool search documentation puts a number on a common case: a setup with GitHub, Slack, Sentry, Grafana and Splunk MCP servers "can consume ~55k tokens in definitions before Claude does any work." That figure is Anthropic's, measured on its own tokenizer, but it gives you the order of magnitude.
There are two execution modes:
- Server-side (the default). Gemini runs the search inside the API call. The launch post says "there's no index to build or host."
- Client-side (
"execution": "client"). Your application receives the search request and returns matches, which suits per-user or per-tenant tool registries. Google says this "adds one round trip per search."
Remote MCP servers work too. Set defer_loading: true on an mcp_server entry and every tool that server exposes loads on demand, per the docs. Client-side retrieval does not apply to MCP servers.
Where It Runs, and the Limits That Matter in Production
Tool Retrieval works only in the Interactions API, only on the v1beta API version, and only on a named list of models. The documentation says "the generateContent method doesn't support it" and that "the API surface may change before general availability." Supported models are gemini-4-carbon, gemini-4-neon, gemini-4-hydrogen, gemini-4-argon, gemini-3.8-flash and gemini-3.6-flash.
That makes the API choice the first decision. The Interactions API overview says the Interactions API has been generally available since June 2026 and calls generateContent "legacy," though still fully supported. If your agent still calls generateContent, using Tool Retrieval means migrating that agent first. Neither the launch post nor the docs page mentions Vertex AI, so if your Gemini traffic runs through Vertex AI, confirm availability with your Google account team before planning around it.
The documented limits are the ones that will bite in production:
- Loaded tools stay loaded. "Loaded tools stay in context for the rest of the conversation and can't be unloaded." A long session that touches many tools drifts back toward the full schema bill.
- One mode per request. Server-side and client-side retrieval can't be combined, and a request carries one
tool_searchentry. - A miss is not an error. A search that matches nothing "produces a text response instead of a structured error," so your harness needs to detect it.
- Tools are not persisted. You must resend the full
toolsarray every turn. If you manage history yourself instead of usingprevious_interaction_id, you have to pass each retrieval step'ssignatureback unchanged.
The previous_interaction_id route has its own governance cost. The overview says paid-tier interactions are retained for 55 days by default, adjustable to 7, 14 or 28 days, and that store=false prevents using previous_interaction_id. Your data-retention review needs to see that before an agent goes live on it.
When Static Loading Is Cheaper
Static loading is cheaper when your tool list is small and stable or your context is long, because every server-side search re-reads the whole conversation. The docs say "each server-side search triggers an extra model call inside the request with the full context plus loaded schemas," and those prompt tokens are reported in total_tool_use_tokens and billed at the input rate. Google's choosing-a-mode table recommends static loading for "fewer than 20 stable tools" and warns that "with small libraries or very long contexts that search on every turn, static loading can cost less."
Caching is what flips the math. A static tool block sits at the front of every request, which is exactly what implicit caching discounts. On the Gemini pricing page, Gemini 4 Neon input is $3.00 per million tokens and cached input is $0.15, a 95% discount. Run the numbers with Anthropic's 55,000-token example as a rough size:
| Scenario on Gemini 4 Neon | Tokens billed | Cost per request |
|---|---|---|
| Static tools, cache miss | 55,000 at $3.00/M | $0.165 |
| Static tools, cache hit | 55,000 at $0.15/M | $0.008 |
| One search, 8,000-token context | 8,000 at $3.00/M | $0.024 |
| One search, 100,000-token context | 100,000 at $3.00/M | $0.30 |
These are illustrative calculations from published list prices, before output tokens, and the search rows leave out the loaded schemas, which add more. They show the shape of the decision. On a short-context agent that misses the cache, one search is a fraction of the static bill. On a long-context agent that hits the cache, a single search costs roughly 36 times the cached tool block. More searches per turn make it worse, and the docs note the model "may issue multiple search calls in one turn."
There is a second caching trap. The caching documentation sets a 4,096-token minimum for implicit caching on Gemini 4 models, and the Tool Retrieval docs warn that deferring tools "can drop a medium prompt below that minimum size." Explicit caching is not available in the Interactions API or for Gemini 4 models at all, per the same page, so you cannot pin the prefix yourself. Our earlier piece on prompt caching savings covers how a single unstable token in the prefix destroys hit rates; the same discipline applies here.
How Gemini's Version Compares With Anthropic and OpenAI
All three vendors now use the same defer_loading pattern, and they disagree on when to use it. Anthropic's tool search tool for Claude is marked stable, allows up to 10,000 deferred tools per request, returns five matches per search by default, and is not metered as a separate server tool. Anthropic recommends it once you have 10 or more tools or more than 10,000 tokens of definitions, and claims it "typically reduces this by over 85 percent" on the multi-server example. That reduction figure is a vendor claim.
OpenAI's tool search guide supports tool_search in the Responses API on gpt-5.4 and later, plus hosted and client-executed modes, and recommends grouping functions into namespaces of fewer than 10 each. It gives no token-savings figure and no numeric threshold for when to switch. If you build on the OpenAI Agents API, the same guide covers MCP discovery there.
| Google Gemini | Anthropic Claude | OpenAI | |
|---|---|---|---|
| Status | Preview, v1beta |
Stable | Documented in Responses API |
| API surface | Interactions API only | Messages API, Bedrock InvokeModel, Google Cloud, Foundry | Responses API, Agents API |
| Use it above | 20 stable tools | 10 tools or 10k tokens | No number given |
| Separate search charge | None; extra model call billed as input | None | Not stated |
| Remote MCP | Yes, server-side only | Yes, via MCP connector | Yes |
On Claude, servers attached through the MCP connector take defer_loading once per server, in the mcp_toolset entry's default_config, rather than on each tool definition.
The odd entry is Google Cloud. Anthropic's documentation lists its tool search as available for Claude models on Google Cloud, while Google's own page for the Gemini feature names no Vertex AI path. If you run both model families on Google Cloud, check which one gives you deferred loading on the platform your security team already approved.
The accuracy argument matters as much as the cost one. Anthropic says Claude's tool selection "degrades once you exceed 30–50 available tools," and our coverage of the UNICEF MCP benchmark found a generic MCP server performing worse than no tools. Retrieval narrows the candidate list, but the model still chooses from names and one-line descriptions, so a badly described tool stays hard to find.
What to Do Before You Turn It On
The work is an inventory and a measured test on the one agent where the tool bill is largest.
This Week:
- List every Gemini agent with its tool count, MCP servers, and whether it calls
generateContentor the Interactions API. Anything under 20 stable tools stays on static loading. - Pull
total_input_tokensandtotal_cached_tokensfor your largest agent so you know what the tool block costs today, with and without cache hits.
This Month:
- On a staging copy of that agent, defer the long-tail tools and keep the three to five most-used tools undeferred, which matches Anthropic's guidance and Google's advice to keep core tools loaded. Do not defer tools your system instructions name.
- Compare
total_tool_use_tokensplus input tokens against the static baseline over a full day of real sessions, not a single request. Long sessions are where retrieval loses. - Rewrite every deferred tool's
short_description. It is now the only text the model sees when choosing.
Before GA:
- Get written confirmation of Vertex AI availability and the GA timeline from your Google account team if you need either.
- Have your data-retention owner sign off on
previous_interaction_idstorage, or build your harness to pass retrieval signatures back statelessly.
If you are also choosing a model for that agent, our cost-per-task reviews of Gemini 4 Neon and Gemini 4 Hydrogen give you the per-token side of the same math.
The Bottom Line
Deferred tool loading is now standard across the three major model APIs, which makes it a harness setting your platform team should own. The MCP governance work many teams did this year, deciding which servers an agent may reach, now has a cost dimension: every server you attach is either a fixed tax on every request or a search the model may run several times a turn. Google's version is the most cautious of the three, with a higher tool threshold and an explicit warning that retrieval can cost more. Take that warning at face value and measure on your own traffic.
Start with the agent that has the most tools and the shortest sessions.
Continue Reading
- Prompt Caching Savings: One Timestamp Turns 80% Into 6%
- UNICEF Tested a Generic MCP Server. It Lost to No Tools.
- Your Bake-Off Ranked Harnesses, Not Models. Re-Run It.
- MCP vs A2A vs OpenAPI: Which Agent Integration Standard to Use
- Your LLM Calls Can Cost Half as Much on Batch or Flex
- Gemini 4 Neon Edges Opus 5.5 on Two Indexes at Lower Cost
