Don't send every tool schema on every agent turn
If you’ve wired an agent up to more than a handful of tools, you’ve felt the tax. Every request starts by shipping the full catalog: names, descriptions, parameter types, required fields. Five tools is fine. Fifty or a hundred, and you’re paying for a lot of schema the model never uses. Google also says tool selection gets worse as that candidate list grows.
On November 19, Google put a preview of Tool Retrieval into the Gemini Interactions API. The idea is straightforward. You still declare the library, but you mark most tools with defer_loading: true and add a tool_search tool. The model still sees each deferred tool’s name and a short description, so it knows what’s on the shelf. The bulky parameter schemas stay out of the prompt until the model actually asks for one. Search, schema load, and the function call then happen inside a single API request. You don’t have to host an index.
That matters if you connect remote MCP servers. Set defer_loading on the server entry and every tool that server exposes is held back, instead of listing them one by one. Google’s documentation puts the cost problem plainly: a few dozen function declarations can consume tens of thousands of tokens on every request. I wouldn’t treat that figure as a guarantee for your stack — measure it — but the direction is obvious if you’ve watched context windows fill up with JSON.
There are two modes. Server-side retrieval is the default, and it’s the one to start with for a large, known library. Client-side retrieval (execution: "client") is there if you already have a registry, permission filters, or vector search. In that mode your app runs the lookup, which adds a round trip, and tools don’t have to be declared up front. You can’t mix the two modes in the same request.
A few constraints matter more than the announcement headline. This is a preview on the v1beta Interactions API, and the surface may change before general availability. The older generateContent method doesn’t support it. Google’s docs list support on Gemini 3.6 Flash, Gemini 3.8 Flash, and the Gemini 4 models Carbon, Neon, Hydrogen, and Argon. There’s no separate feature fee; tokens are billed at the model’s usual rates. Deferred tools contribute only a name and a short description until they’re loaded. Once a schema is retrieved, it stays in the conversation — you can’t unload it. And you still have to send the full tools array on every turn, because the API doesn’t remember your declarations for you.
Google’s guidance for when to bother is specific. If you have fewer than about 20 stable tools, just send the schemas. For bigger libraries, the AI Studio guide suggests keeping your three to five most frequent tools fully loaded and deferring the long tail. Don’t defer a tool you name in the system prompt, or the model may try to call it without searching first. Write clear names and short descriptions; that’s all the model sees until retrieval. If two tools look alike, prefix them by service.
The practical takeaway is not “switch everything tomorrow.” It’s this: if your agent already carries a long tool tail, especially behind MCP, try Tool Retrieval on a staging path, keep the hot tools eager, and compare input tokens and tool-choice mistakes against your current static list. Google notes that for small libraries, or very long contexts that search on every turn, static loading can still cost less. That’s the right way to treat a preview — useful, measurable, and not magic.