Gemini API adds Tool Retrieval in preview for large tool libraries
Google has added Tool Retrieval to the Interactions API of the Gemini API, as a preview. You add a tool_search tool to the request and set defer_loading: true on the function tools to hold back. The model sees only each held-back tool's name and description, and Gemini loads the full parameter schema in the same request when the model needs it. Remote MCP servers can be deferred as a whole. It works with Gemini 3.6 and later, including all Gemini 4 models. There is no separate charge, but each loaded schema counts as input for the rest of the conversation. You can also run the search on your own side, which adds one round trip per search.
Why it matters: The model now picks tools from their names and descriptions alone, so those two lines carry more weight than before. Rewrite your descriptions so each one says when to use the tool and when not to, and keep your most used tools undeferred.
Try this
Rewrite tool descriptions for deferred loading
Sources: Google: Introducing Tool Retrieval in the Gemini API
Guide: Prompt engineering: how it works, with prompts to copy
