Gemini

Gemini API Tool Retrieval: Setup, Costs and Limits

•Make Better Editorial

Google's new Gemini API preview loads tool schemas only when needed. Learn how deferred tools, MCP support, billing and safeguards work.

Google introduced Tool Retrieval in preview on November 19, 2026, for the Gemini Interactions API. The feature lets AI agents keep a large collection of available tools without placing every tool's full parameter schema in the model's initial context. For teams connecting dozens of APIs or MCP tools, that changes how tool descriptions, token costs and permissions should be designed.

What changes when tools are deferred

A conventional function-calling request can include every function's full parameter schema up front. With Tool Retrieval, the model initially sees the deferred tool's name and description, but not its complete parameter definition. Developers add a tool_search tool and mark selected functions with defer_loading: true. When Gemini chooses a deferred function, the service retrieves its schema and the model produces a function call. The application still executes that function and returns its result; retrieval does not authorize or perform the business action by itself.

Google's official example uses a refund function. An agent receiving a damaged-order request searches for the relevant function, loads the order_id and amount parameters, then requests a function call. The developer's code remains responsible for validating the order, enforcing permissions and carrying out the refund. The search, retrieval and function call can be inspected in interaction.steps, which helps diagnose poor tool names or misleading descriptions.

Server retrieval, client registries and MCP

Google provides server-side tool search without requiring developers to host a separate index. Frequently used tools can remain loaded while less common tools are deferred. For teams with an existing tool registry or user-specific permission filter, client-side retrieval is another option: declare tool_search with execution set to client, run the search in your application, and return the selected tool definitions. That adds a round trip per search and leaves permission enforcement with your application.

Remote MCP servers can also be deferred by setting defer_loading: true on the mcp_server tool. Google says the server's exposed tools are then loaded on demand. This is especially relevant when an assistant connects to many integrations, but developers should still restrict the actual functions each user may invoke. Finding a schema is not a substitute for authorization, confirmation or audit logging.

Does Tool Retrieval reduce API cost?

There is no separate Tool Retrieval charge, according to Google's November 19 announcement. Standard input and output model-token charges still apply. The tool_search facility adds a small fixed input-token overhead, and retrieved schemas count as input tokens for the remainder of the conversation. Savings are possible when many schemas remain unloaded; they are not guaranteed for agents with only a few tools or agents that load almost everything. Compare token usage, latency and successful tool selection on representative tasks before enabling it broadly.

Availability and a practical rollout checklist

As announced, Tool Retrieval is a preview feature of the Gemini Interactions API, supported on Gemini 3.6 and later models, including Gemini 4. It should not be assumed to work on every Gemini endpoint or older model. Google's documentation may change while the preview evolves, so confirm current model support and SDK examples before deploying.

  1. Inventory tool names, descriptions and full schemas; group frequently used tools separately from the long tail.
  2. Start with a non-production test in the Interactions API using tool_search and defer_loading on rarely used functions.
  3. Inspect interaction.steps to confirm the right schema was retrieved and the intended function was called.
  4. Compare input tokens, latency, incorrect-tool selections and user-visible errors against the existing implementation.
  5. Keep authorization, validation, human approval for consequential actions and idempotency checks outside the model's tool selection.
FAQ

Questions people ask

How is Gemini Tool Retrieval different from normal function calling?

Normal function calling can supply all parameter schemas before the model chooses a function. Tool Retrieval lets the model see deferred tool names and descriptions first, then load a selected schema on demand. The application still executes the resulting function call and returns its result. Google's November 19 announcement documents this sequence in the Interactions API; it does not remove application-side validation.

Is Gemini Tool Retrieval free, and will it always save tokens?

Tool Retrieval has no separate retrieval fee, but it is not free of model-token charges. Google says tool_search adds a fixed input-token overhead and loaded schemas are billed as model input. Whether total token costs fall depends on how many schemas stay unloaded. Test a representative mix of common and unusual tasks before assuming savings, and check the current Gemini API pricing page.

Can Gemini Tool Retrieval work with MCP servers and private tool registries?

Yes. Google's announcement describes deferred loading for remote MCP servers and a client-side search mode for applications with their own registry or per-user filtering. Client search adds a round trip because the application performs retrieval. In both approaches, enforce access controls independently: discovering a tool's schema must not grant permission to execute a sensitive operation.

Which Gemini models and APIs support Tool Retrieval?

At the November 19, 2026 launch, Google listed Gemini 3.6 and later models, including Gemini 4, through the Gemini Interactions API. The feature is in preview. Do not infer support for older Gemini models or unrelated API endpoints from that announcement. Check Google's current developer documentation and test your exact model and SDK before relying on it in production.

Bottom line

Tool Retrieval is most promising for agents with large, unevenly used tool libraries. It reduces upfront schema exposure, not the need for tool safety or measurement. Start with a controlled comparison and expand only when real workload metrics improve.

Sources & useful resources