Introducing Tool Retrieval in the Gemini API

Practical AI: Tools, Models & Frameworksapi

What changed

Google launched Tool Retrieval in the Gemini API (preview, Interactions API), enabling agents to defer loading full parameter schemas for tools and fetch them on-demand. Developers add a tool_search tool and set defer_loading: true on tools they want held back; the model sees tool names and descriptions, requests specific tools by name when needed, and schemas load within the same API call.

Why it matters

For agents with dozens or hundreds of tools, this reduces input token counts, latency, and improves tool-selection accuracy by keeping candidate lists lean. It works server-side with no index to build, integrates with prefix caching to maintain cache efficiency across turns, and supports both server-side retrieval and client-side custom registries (for permission filtering or dynamic tool discovery).

How it compares

Unlike prior function calling approaches that required sending all tool schemas upfront, Tool Retrieval scales tool libraries by deferring unused schemas. It complements the Managed Agents feature by enabling efficient tool management for remote MCP servers, and works across Gemini 3.6+ models with standard token billing—you only save costs if unused schemas outweigh the fixed tool_search overhead.

Sources