Advertisements

Google has introduced Tool Retrieval in preview for the Gemini Interactions API. The feature lets an agent load function parameter schemas when a task needs them, which reduces the amount of tool information carried into the initial request. Google’s announcement was published on November 19 in UTC, or early November 20 in Beijing. [1]

The change is aimed at applications with substantial tool libraries. A model still receives the names and descriptions of deferred tools, but their full parameter definitions can wait. That preserves a description of what the agent can do while avoiding an initial context filled with every argument for every function. [1]

Advertisements

Choose where retrieval happens

With server-side retrieval, developers add a tool_search entry and mark selected functions with defer_loading set to true. Gemini requests a schema by name, the API supplies it, and the model can then produce a function call. The search and schema-loading steps appear in the response for inspection. [1]

Client-side retrieval gives the application control of the lookup instead. It can search a private registry, rank results or filter tools for a particular user. This mode adds a round trip: the application returns matching definitions before the model proceeds. The documentation also allows tools to appear during an ongoing conversation, such as after an integration is connected. [2]

Check the API and configuration first

The preview requires the v1beta API and is available through Interactions; generateContent does not support it. The documentation permits one tool_search entry per request. Server-side defer_loading should not be combined with client-side execution, since these are different retrieval paths. [2]

Advertisements

Applications do not need to defer everything. Frequently used functions can remain available from the start, while infrequent tools load when selected. Google also describes support for deferring a remote MCP server's tools. This makes the choice more granular than switching an entire application from static loading to retrieval. [1]

Keep execution checks in your application

Google’s function-calling guidance recommends clear function names, specific parameter descriptions and strong types. Those details still matter when the model initially sees a shorter description of a tool. An ambiguous name can make the wrong capability appear relevant before its schema has even been loaded. [3]

The same guidance requires validation before executing a function, appropriate authentication for external APIs and error handling. Retrieving a schema does not establish that a proposed action is permitted. For example, an application that exposes a refund function still needs to check the account, order and requested amount before it sends the refund. [3]

Developers debugging a failed task should therefore examine both stages: whether the model selected the intended tool and whether the application accepted the resulting call. A well-formed request can still fail because an external service rejects it, so returning a usable error result is part of the integration. [3]

Measure the cost with real tasks

Google says Tool Retrieval has no separate fee; normal model token rates apply. Its documentation explains that retrieval introduces a fixed input overhead, and loaded schemas count as input thereafter. Savings depend on how much unused schema text stays out of the conversation. A useful comparison records input tokens, latency and successful task completion across the same representative requests, including tasks that need several tools. [2]

Sources

[1] Google introduces Tool Retrieval in the Gemini API

[2] Gemini API Tool retrieval documentation

[3] Gemini API function calling documentation

Google campus at Googleplex, photographed in September 2016. Archive photograph, not the announcement event. Drshaunakdas / Wikimedia Commons, CC BY-SA 4.0. Resized via Wikimedia thumbnail; derivative image remains under CC BY-SA 4.0. Image source. Image license / permission.

Advertisements

Have a correction or a useful perspective?
Get in touch with the publication.