AI & Agents

Google Previews Tool Retrieval in the Gemini API, So Agents Can Keep a Large Tool Library

Leave a comment

Google has launched Tool Retrieval in the Gemini API, in preview in the Interactions API. When an agent has dozens or hundreds of tools, sending every full parameter schema on every request inflates input tokens, adds latency, and can make tool selection worse as the list grows. Tool Retrieval keeps the full library on standby and loads a tool’s parameter schema only when the current task needs it.

You add a tool_search tool and set defer_loading on the tools you want to hold back. The model still sees each deferred tool’s name and description. When it needs one, the API loads the schema and the model can call the function, all inside the same request. Frequent tools can stay loaded up front. The same deferral works with remote MCP servers, so a large server’s tools can be loaded on demand instead of being listed one by one. If you already keep your own registry, a client-side search mode lets your app return matching schemas. Google says there is no separate charge; tokens are billed at the model’s usual rates, and you save when the schemas you never load outweigh the ones you do. It works with Gemini 3.6 and later models, including Gemini 4, in the Interactions API. This is a preview. I have not used it.

My take

This is a practical answer to a real agent problem: too many tool schemas in the prompt. I would measure it on my own traffic, because Google itself says a small library may not save anything. I will start from the official docs, not from a copied snippet, if I try the preview.

God Bless, and Happy hacking!

References & Further Reading

Subscribe (RSS) Follow AI & Agents via RSS

Leave a note

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.