Complete AI Training
Start for Free

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

AI news ·

Google launches tool retrieval in the Gemini API to reduce token use and latency

Google launched Tool Retrieval in the Gemini API, letting AI agents defer loading parameter schemas until a tool is needed to cut input tokens and latency. The feature carries no extra charge and works with Gemini 3.6 and all Gemini 4 models.

Google launched Tool Retrieval in the Gemini API on Thursday, a feature that lets AI agents manage large tool libraries without sending every parameter schema on every request. The change cuts input token counts and latency, and it arrives first in the Interactions API preview for Gemini 3.6 and later models, including all Gemini 4 models.

When an agent connects to dozens or hundreds of tools, the token cost of shipping full schemas with each call adds up quickly. The candidate list grows, and tool-selection accuracy drops. Tool Retrieval addresses this by keeping parameter schemas out of context until the model decides it needs a specific tool. The model still sees tool names and descriptions, so it knows what is available, but the heavy schema data stays deferred.

How server-side retrieval works

Developers activate the feature by adding a tool_search tool to their request and setting defer_loading: true on the tools they want to hold back. When the model needs a deferred tool, it asks for it by name inside the same API call. The server loads the full schema, and the model emits the function call. All three steps appear in interaction.steps, which makes debugging tool name and description choices straightforward.

There is no index to build or host. Gemini runs the search on the server, so the only code changes are the new tool declaration and a flag on deferred tools. Frequently used tools can stay loaded upfront while the long tail sits on standby. The feature also works with prefix caching: deferred schemas stay out of the prompt start, and loaded schemas arrive later in the conversation, so the cached prefix remains stable across turns.

Tool Retrieval works with remote MCP servers as well. Setting defer_loading: true on an mcp_server tool loads every tool that server exposes on demand, removing the need to list them individually.

Client-side retrieval for custom registries

Teams that maintain their own tool registries, embedding indexes, or per-user permission filters can declare tool_search with "execution": "client" and define their own search parameters. Client-side retrieval adds one round trip per search because the application runs the lookup. Tools do not need to be declared upfront, which means new tools can appear mid-conversation when a user connects an integration.

When the model emits a function call for the search tool, the application returns matching function schemas in the function_result. The model then proceeds with the selected tool inside the same interaction.

Pricing and model support

Tool Retrieval carries no separate charge. Input and output tokens are billed at standard rates for the model in use. Activating tool_search adds a small, fixed block of input tokens, and each loaded schema is billed as input for the remainder of the conversation - the same as a tool declared upfront. The token savings appear when the schemas never loaded outweigh the ones that are, which is typical for large libraries.

Developers who want to build these patterns into their own workflows can explore AI for Software Developers Courses that cover function calling and agent design. The feature is available now in the Interactions API for Gemini 3.6 and all Gemini 4 models.

Why this matters for IT and development teams

For anyone maintaining agents with large tool libraries, the math is simple: fewer tokens per request means lower cost and faster responses. Tool Retrieval removes the trade-off between giving an agent broad capabilities and keeping calls lean. Developers can connect hundreds of tools and let the model pull schemas on demand, rather than pruning the tool list manually or paying for tokens the model never uses. The client-side option also opens the door to dynamic tool registration during a conversation, which matters for applications where users connect integrations on the fly.

Share