← Back to Blog
20 November 2026 /// GEMINI / AI-AGENTS / DEVELOPER-TOOLS

Tool Retrieval: Stop Shipping Your Agent's Whole Tool Library in Every Prompt

Google's Tool Retrieval keeps an agent's entire tool library on standby and loads a parameter schema only when the model asks for it by name — one tool_search entry plus defer_loading on the long tail, in preview on Gemini 3.6 and every Gemini 4 model, with no index to build and no separate charge.

By Guruji Corporation
Two-panel comparison: without tool retrieval every request carries the full parameter schema of every tool, with retrieval the prompt carries only names and descriptions and one schema is loaded when the model asks for it; facts listed are preview in the Interactions API, Gemini 3.6 and later including all Gemini 4 models, server-side search with no index to build, no separate charge
Original graphic by Guruji Corporation. Based on Google's Gemini API Tool Retrieval announcement, 19 November 2026.

A refund agent that does forty things is useful. An agent that can do four hundred is a support engineer's dream and an accountant's problem, and until 19 November every one of those capabilities travelled with every request.

On 19 November 2026 Google launched Tool Retrieval in the Gemini API, in preview inside the Interactions API.[1] The pitch is narrow and concrete: keep the whole tool library on standby, and load a parameter schema only when the current task actually needs it.[1]

What actually happened

Google's framing of the problem is worth reading twice. When an agent connects to dozens or even hundreds of tools, sending every full parameter schema on every request inflates input token counts, adds latency, and lowers tool-selection accuracy as the candidate list grows.[1]

That third clause is the one most teams underestimate. A model choosing between eight tools picks well. A model choosing between two hundred, all described in exhaustive JSON schema in one context window, is retrieving against a noisy list where half the candidates look alike. More tools has never meant more capability per token.

The mechanism is two changes to the request. Add a tool_search entry to your tools list, and set defer_loading: true on the tools you want held back:[1][3]

from google import genai

client = genai.Client()

tools = [
    {"type": "tool_search"},
    {
        "type": "function",
        "name": "issue_refund",
        "description": "Refund an order to the original payment method.",
        "defer_loading": True,
        "parameters": {
            "type": "object",
            "properties": {
                "order_id": {"type": "string"},
                "amount": {"type": "number"},
            },
            "required": ["order_id", "amount"],
        },
    },
    # ... 50+ other deferred functions (leave frequent tools undeferred)
]

interaction = client.interactions.create(
    model="gemini-4-hydrogen",
    input="Order A-1042 arrived damaged. Please refund 40 dollars.",
    tools=tools,
)

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 it needs one, it asks for that tool by name, the API loads the full schema, and the model emits the function call — all inside the same request.[1]

Google exposes the three steps separately in interaction.steps: a tool_search_call, a tool_search_result carrying the loaded schema, and then the function_call.[1] For anyone who has debugged a wrong tool choice at 11 p.m., a visible record of which tools the model considered before acting is worth more than the token saving.

There is no index to build, host or refresh. The search runs on Google's side, so the only code changes are the new tool entry and a flag on the tools you want deferred, and the sensible starting split is to leave your most-used tools loaded up front and defer the long tail.[1]

Two details make it more than a one-off trick. First, it composes with prefix caching: deferred schemas sit outside the start of the prompt, the loaded schemas arrive later in the conversation, and the cached prefix therefore stays identical from turn to turn.[1] Second, it works with remote MCP servers — set defer_loading: true on an mcp_server tool and every tool that server exposes is loaded on demand, so you can connect a large server without listing its tools one by one.[1][2]

There is also a client-side variant for teams that already own a tool registry: declare tool_search with "execution": "client" and your own search parameters, and your application runs the lookup instead. That costs one extra round trip per search, but tools no longer have to be declared upfront, so new tools can appear mid-conversation when a user connects an integration.[1]

The bill, stated plainly

Google has been unusually direct about the pricing, and the directness is the useful part. Tool Retrieval carries no separate charge; input and output tokens are billed at the standard rates for the model you call.[1]

What changes is the shape of the prompt. Turning on tool_search adds a small, fixed block of input tokens. Each schema the model loads is then billed as input for the rest of the conversation, exactly as if it had been declared up front.[1]

So the saving is arithmetic, not magic: you come out ahead when the schemas you never load outweigh the ones you do. Google's advice is to measure it against your own traffic — correct, and a warning that the gain is workload-dependent.[1]

What it does not fix

It is a preview, and it lives in one API surface. Tool Retrieval is in preview in the Interactions API, for Gemini 3.6 and later including all Gemini 4 models.[1] A team on generateContent today is looking at a migration, not a config flag.

Savings are conditional. An agent with twelve tools that uses eleven on most requests will load nearly every schema anyway, pay the fixed block, and save nothing. The feature pays for large libraries with a long, rarely-used tail.

Your descriptions become the retrieval index. The model decides what to fetch from a one-line name and description. Vague names like process_item now cost twice — once in bad selection, once in a wasted search — and the visible tool_search_call steps make that failure easy to spot.

Client-side mode adds a hop. One extra round trip per search is real latency, worth it only when you need per-user permission filtering or a registry that changes at runtime.[1]

Why this matters for Indian SMBs and mid-market teams

The biggest agent line item is the one nobody itemised. Support, order-management and back-office agents in mid-market companies accumulate tools the way a WhatsApp group accumulates members: one integration at a time, each justified on its own, none ever removed. The cost shows up as input tokens on every turn and as a slower, vaguer model, and it is invisible in a dashboard that reports only requests and spend.

Tool count is now a budget line you can name. Before this, trimming a tool library meant deleting integrations and risking a workflow. Deferring is reversible, per tool, with no deletion.

Permission shape becomes a design choice. The client-side variant exists precisely because some registries must filter by user role.[1] For finance, HR and clinical workflows in regulated Indian enterprises, "the agent can only fetch the tools this user is allowed to use" is a materially easier conversation with an auditor than "the agent knows about every tool and we hope it behaves".

Test on pass rate, not on token count alone. A cheaper prompt that picks the wrong tool is not cheaper. Run the same fixed evaluation set and score completed-task accuracy and rupees per completed task, after retries.

Where Guruji Corporation fits in

Guruji Corporation builds and maintains AI-assisted software for Indian SMBs and mid-market teams. A feature like this changes the first week of an engagement, not the architecture: inventory every tool the agent has, split the list into the handful that run on most requests and the rare long tail, write descriptions a stranger could act on, then run both configurations against a fixed set of real tickets and compare pass rate with cost per completed task. If the long tail is short, this is a footnote. If it is long, it is the cheapest token reduction available this month.

Talk to us

If you want to know what deferring the long tail would do to your agent's accuracy and your monthly bill — measured on your own traffic, not on a vendor chart — get in touch.

Sources

Want to see how we can build your project?

Send us your project outline or chat directly on WhatsApp.