知Yizhi Daily
← Back to this edition

AI

Gemini API introduces tool retrieval to reduce overhead for large tool libraries

Edition 2026-11-21 · 08:00 Beijing time

Google is previewing Tool Retrieval in the Gemini API’s Interactions API. When agents connect to many tools, they no longer need to load all parameter schemas with every request; the model first sees tool names and descriptions, then retrieves the full schema and calls the function within the same request when needed, reducing input tokens, latency, and mistaken tool selection.

Google AI explains that when an agent connects to dozens or even hundreds of tools, placing every tool’s complete parameter schema in every request quickly increases input tokens and latency, while reducing selection accuracy as the number of candidate tools grows. Tool Retrieval keeps the full tool library on standby and loads parameter schemas only when needed for the current task.

Developers can include tool_search in requests and set defer_loading for tools whose loading should be postponed. The model can still see the names and descriptions of all deferred tools; when it needs a tool, it requests it by name, the API loads the complete parameter schema in the same call, and the model then issues a function call. The entire search, loading, and calling process appears in interaction.steps for easier debugging.

The feature does not require developers to build or host an index themselves; retrieval is performed by Google’s servers. Frequently used tools can remain preloaded, while low-frequency tools are loaded on demand. It can also work with prefix caching, preventing lazily loaded schemas from breaking cache prefixes. For remote MCP servers in the Gemini API, developers can also set all tools exposed by those servers to load on demand. If developers maintain their own tool registry, embedding index, or user-permission filtering, they can use client-side retrieval mode.

Original sources

Google AI ↗
Back to this editionOpen interactive reader