Google adds Tool Retrieval to the Gemini API in preview, loading tool schemas on demand
Google says Tool Retrieval is now in preview in the Gemini Interactions API. It lets an agent keep a large tool library on standby and load a tool's parameter schema only when a task needs it, which Google says reduces input tokens and latency and helps tool selection stay accurate as the number of tools grows.
To use it, add a tool_search tool to the request and set defer_loading: true on the tools to hold back. The model still sees each deferred tool's name and description; when it needs one, it asks by name, the API loads the schema, and the model makes the call, all within one request. The steps show up in interaction.steps for debugging. Setting defer_loading: true on a remote MCP server tool defers every tool that server exposes. Developers who run their own registry, embedding index or permission filter can declare tool_search with "execution": "client", which costs one extra round trip per search and lets them expose tools mid-conversation.
Google says there is no separate charge: tokens are billed at the model's standard rates, tool_search adds a small fixed block of input tokens, and each loaded schema is billed as input for the rest of the conversation. It says deferred schemas stay out of the start of the prompt, so prefix caching is unaffected. The feature works with Gemini 3.6 and later models, including all Gemini 4 models.
Sources
- Introducing Tool Retrieval in the Gemini APIantigravity
Get news like this as a push.
AI Tracker alerts you when something changes for the tools you use.