International Edition
Latest News
Technology

Google DeepMind Adds Tool Retrieval Preview to Gemini API

“Tool Retrieval is now in preview in the Gemini Interactions API,” Google DeepMind Research Scientist Nora Kassner wrote on the Google AI Blog Monday. The feature lets developers load tool parameter schemas on demand instead of sending every…

Google DeepMind Adds Tool Retrieval Preview to Gemini API

“Tool Retrieval is now in preview in the Gemini Interactions API,” Google DeepMind Research Scientist Nora Kassner wrote on the Google AI Blog Monday.

The feature lets developers load tool parameter schemas on demand instead of sending every definition with each request, targeting a bottleneck that appears when agents connect to dozens or hundreds of functions.

“reduces input token counts and latency by loading parameter schemas only when needed,” the Google AI Blog reported. Tool Retrieval keeps the full library on standby and pulls schemas only when the model decides it needs a specific function.

Developers enable the feature by adding a tool_search entry to their tool list and setting defer_loading: true on functions they want held back. The model still sees every tool’s name and description, so it can choose the right one from the conversation context.

When the model issues a tool_search_call, the API returns the full schema in a tool_search_result, and the model then emits the standard function_call. All three steps appear in the interaction.steps array for debugging, according to the Google AI Blog.

Introducing tool retrieval in the gemini api
Photo: khanlist.com

A minimal Python example from the announcement shows the flow: a refund tool marked defer_loading: true stays out of the initial payload; when the user asks to refund an order, the model searches for issue_refund, the API loads its schema, and the model calls the function — all inside a single API call.

No separate index or hosting infrastructure is required; Gemini runs the search on the server, the Google AI Blog reported.

Token efficiency improves because only names and descriptions travel in the initial prompt. Tokens are spent on schemas the model actually uses. Latency drops because the initial request is smaller and subsequent schema loads happen within the same call, avoiding extra round trips.

Tool retrieval max format
Photo: clipraptor.info

Deferred schemas sit outside the static prompt prefix, so cached prefixes remain reusable across conversation turns, the Google AI Blog reported. For teams using remote Model Context Protocol servers, setting defer_loading: true on an mcp_server tool automatically defers every function that server exposes, letting developers connect massive external collections without enumerating each one.

Client-side retrieval is available for teams that maintain their own tool registry, embedding index, or per-user permission filter. Declaring the tool_search tool with "execution": "client" and defining search parameters shifts the lookup to the application, which adds one round trip per search. Tools do not need to be declared upfront, so developers can expose new tools mid-conversation when a user connects an integration, the Google AI Blog reported.

Google DeepMind, founded in the UK on 15 November 2010 and acquired by Google in 2014, merged with the Google Brain division in April 2023 to form the unit behind the Gemini models powering this preview. The laboratory first drew wide attention in 2016 when its AlphaGo program defeated Go world champion Lee Sedol, and in 2020 its AlphaFold system predicted structures for virtually all known proteins, a breakthrough shared via the AlphaFold database.

The preview is available today in the Gemini Interactions API with the latest Gemini models.

About the author: Technology Desk

Technology Desk at Archynewsy.