TAU-HOME.COM
LOADING

Google Unveils 'Tool Retrieval' Preview for Gemini API, Enhancing Large Tool Libraries

Google has released 'Tool Retrieval' in preview for the Gemini API's Interactions API (v1beta). This feature aims to reduce token waste from numerous function d

tau · November 24, 2026

#Google #Gemini API #Tool Retrieval #AI #Developer Tools #Preview

Google Unveils 'Tool Retrieval' Preview for Gemini API, Enhancing Large Tool Libraries

Google announced the preview release of 'Tool Retrieval' for the Gemini API on November 19, 2026. This new capability, available within the v1beta version of the Gemini Interactions API, is designed to significantly improve the efficiency of artificial intelligence (AI) agents that utilize extensive tool libraries.

Image featuring a Gemini spark on a space background, symbolizing Google Gemini API's Tool Retrieval feature.

Image source: Google

Traditionally, when an AI agent needed to access dozens or even hundreds of software tools, it had to send the full parameter schema for every tool with each request. This approach led to inflated input token counts, increased latency, and diminished tool-selection accuracy as the list of candidate tools grew. Tool Retrieval addresses these challenges by loading tool parameter schemas only when they are actively required.

What is Tool Retrieval?

Tool Retrieval is a feature designed to help AI agents using the Gemini API manage vast tool libraries more efficiently. In this context, a 'tool' refers to a function or service interface that an agent can call to perform a specific task, and a 'parameter schema' defines the input values required by that tool.

The core idea behind this feature is that instead of including the detailed schema for every tool in the agent's context at all times, the agent maintains only the names and descriptions of available tools. When a specific tool is needed for a task, its full schema is dynamically loaded. This is analogous to a library user browsing book titles and descriptions, then only retrieving the full book when they decide to read it.

How It Works and Key Advantages

To enable Tool Retrieval, developers need to add a tool_search tool to their API request and set the defer_loading: true flag on any tools they wish to load on demand.

from google import genai

client = genai.Client()
tools = [
    {"type": "tool_search"},
    {
        "type": "function",
        "name": "issue_refund",
        "description": "Refund an order to the original payment method.",
        "defer_loading": True, # Defer loading this tool's schema
        "parameters": {
            "type": "object",
            "properties": {
                "order_id": {"type": "string"},
                "amount": {"type": "number"},
            },
            "required": ["order_id", "amount"],
        },
    },
    # ... 50+ other deferred functions (frequent tools can remain undeferred)
]

interaction = client.interactions.create(
    model="gemini-4-hydrogen",
    input="Order A-1042 arrived damaged. Please refund 40 dollars.",
    tools=tools,
)

The model still sees the name and description of tools marked with defer_loading: true, so it understands what's available. However, the parameter schemas remain out of context. When the model determines a tool is needed, it requests it by name. The API then loads the full schema, and the model calls the function—all within the same API request.

This entire process is transparently logged in interaction.steps, making it easy to inspect which tools the model considered during debugging of tool names or descriptions.

"steps": [
    {
        "type": "tool_search_call",
        "id": "tsc_7f2a",
        "arguments": {"function_names": ["issue_refund"]},
        "signature": "..."
    },
    {
        "type": "tool_search_result",
        "call_id": "tsc_7f2a",
        "result": [{"type": "function", "name": "issue_refund", "parameters": {...}}],
        "signature": "..."
    },
    {
        "type": "function_call",
        "id": "fc_91c3",
        "name": "issue_refund",
        "arguments": {"order_id": "A-1042", "amount": 40}
    }
]

Tool Retrieval requires no separate index to build or host. Gemini performs the search on its server, meaning developers only need to add the new tool_search tool and set the defer_loading flag on their existing tools. This allows for a hybrid approach where frequently used tools can be loaded upfront, while less common ones are deferred, maximizing efficiency. The feature also integrates seamlessly with prefix caching and supports remote MCP (Multi-Cloud Platform) servers; setting defer_loading: true on an mcp_server tool will cause all tools exposed by that server to be loaded on demand.

Client-Side Retrieval and Model Compatibility

For developers who maintain their own tool registries, embedding indexes, or per-user permission filters, client-side retrieval is an option. This involves declaring the tool_search with \"execution\": \"client\" and defining custom search parameters. While client-side retrieval adds one round trip per search (as the application performs the lookup), it offers flexibility, allowing new tools to be exposed mid-conversation through integrations without needing upfront declaration.

Tool Retrieval is compatible with Gemini 3.6 and later models, including all Gemini 4 models, within the Interactions API.

Pricing and Getting Started

There is no separate charge for using Tool Retrieval. Input and output tokens are billed at the standard rates for the model being called. Enabling tool_search adds a small, fixed block of input tokens. Each schema loaded by the model is then billed as input for the remainder of the conversation, similar to a tool declared upfront.

Token savings are realized when the number of schemas that are not loaded outweighs those that are, which is typically the case for large tool libraries. Developers are encouraged to measure the impact against their own traffic patterns.

To learn more about Tool Retrieval and how to get started, Google provides comprehensive resources:

Sources

Impact-Site-Verification: 9b3ebd10-6c45-44cf-a014-5b8c19b7b285