Skip to content
AI.info

The Pulse

Google previews on-demand tool retrieval for Gemini API

Google is previewing Tool Retrieval in the Gemini Interactions API, allowing developers to load tool parameter schemas as needed. The feature has no separate charge and supports Gemini 3.6 and later models.

Google previews on-demand tool retrieval for Gemini API

Developers can now load tool parameter schemas as needed rather than sending a full library with every request, through a preview in the Gemini Interactions API. Google introduced the feature, called Tool Retrieval, on November 19.

The feature works with Gemini 3.6 and later models, including all Gemini 4 models. Google says sending full schemas for large tool libraries can increase input-token counts and latency and reduce tool-selection accuracy as the list of candidates grows.

Loading tools on demand

To enable the feature, developers add a tool_search tool to a request and set defer_loading: true on the tools they want to hold back. The model can still see each deferred tool’s name and description, but its parameter schema stays out of context until needed.

When the model needs a tool, it requests it by name, the API loads its full schema and the model calls the function within the same request. A search, schema load and function call appear in interaction.steps, where developers can inspect them when debugging tool names or descriptions. After the function call, the application runs the function and returns a function_result.

Gemini performs the search on the server, with no index for the developer to build or host. Developers can leave frequently used tools loaded from the start while deferring others.

Caching and remote servers

Tool Retrieval also works with prefix caching. Deferred schemas stay out of the start of the prompt, while schemas the model loads are added later in the conversation, keeping the cached prefix unchanged between turns.

The feature also supports remote MCP servers in the Gemini API. In that configuration, setting defer_loading: true on an mcp_server tool loads the tools exposed by that server on demand, without requiring developers to list them individually.

Client-side searches

Developers can instead use client-side retrieval if they maintain a tool registry, an embedding index or a per-user permission filter. They declare tool_search with execution set to client and define the search parameters; the application then performs the lookup.

That approach adds one round trip per search. Tools do not have to be declared in advance, and an application can expose new tools during a conversation when a user connects an integration.

Token billing

Tool Retrieval has no separate charge. Input and output tokens are billed at the standard rates for the model used.

Turning on tool_search adds a small, fixed block of input tokens. Each schema the model loads is billed as input for the rest of the conversation, as it would be for a tool declared at the start.

Token savings depend on whether the schemas left unloaded outweigh those retrieved. Google recommends that developers measure the feature against their own traffic.

Sources

  1. Original source · Blog post Google blog.google

Companies in this story

Related stories

Explore

More articles