Home / Blog / Google introduces Tool Retrieval in the Gemini API
Tech News

Google introduces Tool Retrieval in the Gemini API

Google launched Tool Retrieval in preview for the Gemini Interactions API to cut token costs by loading function schemas on demand for Gemini 3.6 and Gemini 4.

By Dillip Chowdary • Nov 20, 2026 • Source: Google Keyword Blog

Google introduces Tool Retrieval in the Gemini API
Image: Google Keyword Blog

At a glance

Product
Tool Retrieval
Feature status
Preview in Interactions API
Release date
Nov 19, 2026
Base pricing
No separate charge; standard token rates
Model support
Gemini 3.6 and later, including all Gemini 4
Primary authors
Lucia Loher and Nora Kassner

Google launched Tool Retrieval in preview for the Gemini Interactions API on Nov 19, 2026, giving developers a way to load tool parameter schemas on demand instead of bundling full tool specifications into every single model prompt. As detailed in Google Keyword Blog's report, the mechanism is built to reduce prompt input token counts, lower response latency, and preserve tool-selection accuracy when autonomous agents connect to dozens or hundreds of functions. Product Manager Lucia Loher and Google DeepMind Research Scientist Nora Kassner announced the launch across the Gemini Interactions surface.

This report covers the execution architecture of server-managed and client-managed tool retrieval, remote Model Context Protocol integration, prefix caching implications, billing mechanics, and model support. Software engineers, agent platform architects, and API developers managing large catalogs of external APIs or database connectors will find the exact request schema flags and step flows explained below.

01Server retrieval and deferred parameter loading

To activate server-side retrieval, developers add a tool_search tool to the tools array and append a defer_loading flag set to true on any function definition they wish to hold back from initial prompt context. The underlying model retains visibility into the name and description strings of each deferred tool so it remains aware of available capabilities, while the verbose parameter property schemas remain unloaded. When the model determines a query requires a deferred tool, it requests the tool by name, the API loads the full parameter schema on the server side, and the model emits the corresponding function call within the same request.

Developers can keep frequently used tools undeferred while deferring the long tail across libraries of 50 or more functions. Because Google runs the retrieval search on the server, developers do not need to build, host, or manage an external vector search index or embedding database.

  1. Add a tool_search object of type tool_search to the tools array.
  2. Mark target functions with defer_loading set to true alongside standard name and description fields.
  3. Call client interactions create with model gemini-4-hydrogen or any supported release.
  4. Inspect interaction steps to observe tool_search_call, tool_search_result, and the resulting function_call.
  5. Execute the requested local function and return a function_result back to the API.

02Step visibility and prefix cache compatibility

Every stage of the resolution sequence is explicitly logged inside the interaction steps array returned by the API call, enabling structured tracing when debugging tool naming and description collisions. When a model selects a deferred utility, the trace records a tool_search_call step containing an identifier, argument payload with function_names, and a cryptographic signature. This is followed by a tool_search_result step returning the resolved function schema and a standard function_call step containing the final arguments.

Deferred schemas also integrate cleanly with context prefix caching across multi-turn sessions. Because deferred parameter definitions stay excluded from the initial prompt preamble, cached prefixes remain invariant from turn to turn across agent interactions. The schemas retrieved dynamically by the model append later in the conversation history, preserving prompt cache hits while minimizing repeated token overhead.

Note: Tool Retrieval is currently available in preview mode within the Gemini Interactions API rather than the legacy completions endpoint.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

03Remote Model Context Protocol server support

Tool Retrieval integrates directly with remote Model Context Protocol servers connected through the Gemini API interface. Instead of requiring developers to manually query and declare every individual tool exposed by a remote service in code, developers set defer_loading to true on an mcp_server tool entry. The Gemini API then automatically queries and loads individual tools exposed by that server on demand during execution.

This integration eliminates upfront schema dumps when connecting complex external enterprise systems, databases, or local workspace orchestrators exposing massive tool surfaces. Agents maintain dynamic access to entire external environments without saturating their initial context window with unused endpoint documentation.

Integration modeIndex managementRound tripsDynamic mid-session tools
Server-side retrievalManaged by GoogleSingle API callNo, declared up front
Client-side retrievalManaged by developerAdds one round tripYes, mid-conversation
Remote MCP serverManaged by remote serverOn demandYes, across remote catalog

04Client registries and dynamic permission filtering

For architectures requiring proprietary tool registries, private embedding indexes, or tenant-specific permission gates, the API supports client-managed retrieval. Developers declare a tool_search definition with execution set to client and specify custom parameter schemas such as search query strings. This configuration routes tool queries back to the developer application, introducing one additional network round trip per search while leaving total control over tool lookup logic with the caller.

Client-side execution eliminates the requirement to declare tools upfront in the initial request array. Applications can expose newly authenticated integrations or user-granted scopes mid-conversation by resolving search_tools function calls and returning matching function schemas inside standard function_result blocks on subsequent interaction turns.

05Model compatibility and standard token pricing

Tool Retrieval incurs no separate feature fee, platform surcharge, or subscription tier inside the Gemini API. Input and output tokens consumed during tool search and schema injection bill strictly at the standard published rates for the chosen underlying model. Enabling tool_search adds a small, fixed block of baseline input tokens to the request payload.

Each parameter schema retrieved by the model is billed as input token consumption for the remainder of the multi-turn interaction, identical to an upfront declaration. Net token savings materialize whenever the aggregate token volume of unretrieved schema definitions outweighs the small overhead of tool_search and loaded functions. The feature is supported on Gemini 3.6 and later models, including all Gemini 4 series models such as gemini-4-hydrogen.

Frequently asked questions

What does Tool Retrieval in the Gemini API do?

It loads parameter schemas for tools on demand instead of requiring developers to send entire tool catalogs in every request, saving input tokens and maintaining tool selection accuracy.

Which Gemini models support Tool Retrieval?

Tool Retrieval is supported on Gemini 3.6 and later models, including all Gemini 4 models such as gemini-4-hydrogen, within the Interactions API.

How does billing work for Tool Retrieval?

There is no separate charge for the feature; developers pay standard model input and output token rates, with retrieved schemas billed as input tokens for the rest of the conversation.

Can developers use custom search indexes with Tool Retrieval?

Yes, setting execution to client on a tool_search tool allows developers to use their own tool registries, embedding indexes, and permission filters.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →