Tool retrieval in the Gemini API

Google has launched a preview of Tool Retrieval in the Gemini Interactions API, allowing agents to load tool parameter schemas on demand.

2 min read

Gemini spark logo against a dark space background.
The Gemini API introduces Tool Retrieval to streamline large tool libraries.

Building AI agents that connect to dozens or hundreds of software tools introduces practical challenges. Sending every full parameter schema on every request inflates input token counts, adds latency, and can lower tool-selection accuracy as the candidate list grows. To address this, Google is introducing Tool Retrieval in the Gemini API.

Key facts

Status
Preview
Minimum model requirement
Gemini 3.6

How it works

Tool Retrieval lets your agent keep its full tool library on standby and load parameter schemas only when the current task requires them. To turn on the feature, developers add a tool search tool to their request and set a defer loading flag on the tools they want to hold back.

The model still sees the name and description of every deferred tool so it knows what is available, but the parameter schemas stay out of the prompt context. When the model needs a tool, it asks for it by name, the API loads the full schema, and the model calls the function within the same request.

Server side and client side execution

There is no separate index to build or host because Gemini runs the search on the server. Developers can keep their most-used tools loaded up front and defer the long tail. The feature also works with remote Model Context Protocol servers in the Gemini API, where setting the defer loading flag on a server tool ensures every tool that server exposes is loaded on demand.

For developers who maintain their own tool registry, embedding index, or per-user permission filter, client-side retrieval is also supported by declaring execution as client. This allows applications to run their own lookups and even expose new tools mid-conversation when a user connects an integration.

Pricing and availability

Tool Retrieval has no separate charge, and input or output tokens are billed at the standard rates for the model being called. The feature is available in preview in the Interactions API and works with Gemini 3.6 and later models, including all Gemini 4 models.

Source: Original announcement

Worth a read?

Report

Comments