Gemini API lets agents defer tool schemas until they are needed
Tool Retrieval, now in preview in the Gemini Interactions API, keeps only a tool's name and description in context and loads the full schema on demand.
Google launched Tool Retrieval in preview for the Gemini Interactions API on 19 November. It targets a specific cost: when an agent is wired up to dozens or hundreds of tools, sending every full parameter schema on every request inflates input tokens, adds latency, and makes tool selection worse as the candidate list grows.
With Tool Retrieval on, the model sees only each tool’s name and description by default. You add a tool_search tool and set defer_loading: true on the tools you want held back; when the model needs one, it asks for it by name, the API loads the full schema, and the model calls the function, all inside the same request. It works with Gemini 3.6 and later, including every Gemini 4 model, but only through the Interactions API, not the older generateContent method. There’s no separate charge: input and output tokens bill at the model’s standard rate, so the saving comes from the schemas you never load.
{
"tools": [
{ "type": "tool_search" },
{ "name": "search_flights", "defer_loading": true, "parameters": { ... } }
]
}
Why it matters: this is a real constraint for anyone building agents against large MCP tool catalogues or internal tool libraries, where most of a request’s tokens can end up being schemas the model never calls. Deferred loading only helps once a library is large enough that the unused schemas outweigh the used ones, which Google itself says you need to measure against your own traffic.
The caveat: setting execution: client for custom retrieval logic adds a round trip per search, so it trades some latency back for flexibility.