Gemini Tool Retrieval Cuts Agent Token Waste

Gemini Tool Retrieval fixes an expensive habit in AI agents: paying for tools your agent never calls. Google launched it in preview on November 19, 2026, in the Gemini Interactions API.

Until now, an agent with dozens or hundreds of tools received every tool’s full schema on every request. That inflates input tokens, adds latency, and makes the model worse at picking the right tool. Tool Retrieval keeps the library on standby and loads each schema only when needed.

Gemini Tool Retrieval: load tool parameter schemas on demand in the Gemini API

How Tool Retrieval works

Turning it on takes two changes, per Google’s announcement by Lucia Loher (Product Manager, Gemini API) and Nora Kassner (Research Scientist, Google DeepMind):

  1. Add a tool_search tool to your request.
  2. Set defer_loading: true on the tools you want to hold back.

The model still sees every deferred tool’s name and description, so it knows what is available. The schemas stay out of context. When the model needs a tool, it asks for it by name, the API loads the schema, and the model calls the function — all in one request.

Google’s example: a customer reports order A-1042 arrived damaged and asks for a $40 refund. In one call, the model searches for issue_refund, the API loads its schema, and the model emits the function call. All three steps appear in interaction.steps, so you can inspect which tools the model considered.

No index to build or host: Gemini runs the search on the server. Keep your most-used tools loaded up front and defer the long tail.

How Tool Retrieval works: add tool_search, flag tools with defer_loading, and the API loads schemas on demand

What it costs — and what it saves

Tool Retrieval has no separate charge. The billing picture from Google’s announcement:

Item How it is billed
Tool Retrieval itself No separate charge
Input and output tokens Standard rates for the model you call
Turning on tool_search Adds a small, fixed block of input tokens
Each schema the model loads Billed as input for the rest of the conversation
Schemas you never load Never billed — that is where the saving comes from
Supported models Gemini 3.6 and later, including all Gemini 4 models

Google’s guidance: you save when the schemas you never load outweigh the ones you do — the usual case for large libraries. Measure it against your own traffic. Google publishes no benchmark figure, so do not promise a client a percentage before measuring your own calls.

Two details matter. First, Tool Retrieval suits prefix caching: deferred schemas stay out of the prompt’s start, so the cached prefix stays the same turn to turn. Second, it works with remote MCP servers: set defer_loading: true on an mcp_server tool and every tool it exposes loads on demand.

One request, three steps

1. Request

Your call carries 50+ tools, names only

2. tool_search_call

The model asks for issue_refund

3. tool_search_result

The API loads that one schema

4. function_call

The model calls issue_refund

5. Your code runs

You run the $40 refund

How to profit from Tool Retrieval

Token waste is a margin killer for anyone selling agents. Tool Retrieval turns it into profit four ways:

  1. Cut the token bill on agents you already sell. Audit your tool list, keep the five or ten tools each agent uses most loaded, and defer the rest. Every schema you stop sending is input tokens you stop paying for.
  2. Sell bigger agents at the same price. An agent with 200 tools used to be a cost problem. Now offer a wide catalog — CRM, billing, docs, support — without the per-turn schema tax, and hold your price while competitors raise theirs.
  3. Offer MCP catalog connections as a service. Connect a client’s whole MCP server with one deferred entry instead of hand-wiring every function. Charge once for setup, then maintain it monthly.
  4. Use the trace to sell reliability. The interaction.steps log shows which tools the model considered. Offer clients a monthly tool-selection accuracy report — a deliverable that justifies a retainer.

Start with one agent, measure the token difference over a week of real traffic, then roll the pattern out.

The honest limits

Tool Retrieval is in preview, and previews change. The API surface can shift before GA, so pin your model version and watch the interaction.steps shape.

A client-side mode exists for teams with their own tool registry, embedding index, or per-user permission filter. Declare tool_search with "execution": "client" and your app runs the lookup — but that adds one round trip per search, and tools need not be declared up front, so you can expose new tools mid-conversation.

For context, per launch coverage: Anthropic shipped a similar design in November 2025 and OpenAI in March 2026. Google is catching up to a settled pattern — good news for builders, because the concept is proven.

FAQ

What is Gemini Tool Retrieval?

A preview feature in the Gemini Interactions API. It keeps a large tool library on standby and loads each schema only when the current task needs it.

How do I turn on Tool Retrieval?

Add a tool_search tool to your Interactions API request and set defer_loading: true on the tools you want to hold back.

Does Tool Retrieval cost extra?

No. It has no separate charge. Tokens are billed at the standard rates for the model you call, plus a small fixed block for tool_search itself.

Which models support Tool Retrieval?

Gemini 3.6 and later models, including all Gemini 4 models, in the Interactions API.

Does Tool Retrieval work with MCP servers?

Yes. Set defer_loading: true on an mcp_server tool and every tool that server exposes loads on demand.

How much can Tool Retrieval save me?

Google publishes no benchmark figure. You save when the schemas you never load outweigh the ones you do. Measure it against your own traffic.

Is Tool Retrieval generally available?

No. It is in preview in the Interactions API, so the API surface can change. Pin your model version in production.

Sources: Google’s official announcement: Gemini API tool retrieval for efficient agent scaling (November 19, 2026); Tool Retrieval documentation (Google AI Studio). No official Google YouTube video about this feature exists yet.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top