Gemini API previews Tool retrieval: stop sending the whole tool manual on every request
Google is previewing Tool retrieval in the Gemini Interactions API so agents can load function schemas on demand; gateway users must verify protocol, routing and billing separately.
The short version
Google's official update log says that on November 19, 2026, the Gemini API added Tool retrieval as a preview in the Interactions API. It changes how a large tool library is sent: tools can be marked with defer_loading: true, while Gemini retrieves the relevant function schema when needed. Developers can add {"type":"tool_search"}, or set execution: "client" and run their own retrieval logic1.
For gateway users, three consequences matter:
- Tool definitions may not be safe to forward unchanged. An older OpenAI-compatible client often sends one complete
toolsarray and may not understand Interactions API retrieval fields. - A working model name does not prove protocol support. Google describes the feature for the Interactions API, with Gemini 3.6 and later, including the Gemini 4 family. It is not an automatic acceleration switch for every
/v1/chat/completionsrequest1. - Measure real usage before promising savings. The official entry does not list a separate Tool retrieval price. Compare provider usage, gateway usage and the actual upstream bill instead of turning fewer schema tokens into a fixed discount claim.
What actually changed
A traditional agent may have tools for orders, address changes, email, knowledge search and code execution. To make them callable, the client sends every name, description, parameter type and required field with every request. Once the library grows from a dozen tools to hundreds, schemas consume context and make similar tools harder to choose.
Tool retrieval separates the process into two stages. First, the model or client searches the tool library. Then it loads the selected function schema and performs a normal function call. The application still executes the tool; Google's update does not hand execution authority to the model. The important engineering change is a new retrieval boundary between the catalog and the request.
The official entry identifies three configuration points:
- Mark tools that should be loaded later with
defer_loading: true.
- Add the
tool_searchtool so Gemini can retrieve schemas.
- Use
execution: "client"when the application should control retrieval.
The support boundary matters: Gemini 3.6 and later, including all Gemini 4 models, through the Interactions API. Do not assume that any endpoint accepting a Gemini 4 model accepts the same fields.
Integration advice for SalpX and other gateways
1. Confirm the client endpoint first
If your SDK only calls /v1/chat/completions and the gateway merely replaces the model value, it may still be using the old protocol. Confirm Interactions API support before putting defer_loading inside a generic tools field.
Keep a minimal test request. Record the URL, model ID, protocol, status, usage fields and raw error body. Start with one simple tool rather than hundreds.
2. Check whether the relay drops fields
Compatibility layers often keep only messages, model, temperature and part of tools. A relay may silently discard unknown fields, producing a normal text answer even though retrieval never happened. Compare the gateway request summary with the upstream request and confirm that defer_loading, tool_search and client execution mode arrive as intended.
3. Validate cost before production
Fewer schemas may reduce input context, but a retrieval step can also add calls or tokens. The official entry does not specify a separate Tool retrieval price, so run an A/B test with the same task, model and tool catalog. Compare input tokens, time to first byte, selection accuracy and total task cost.
Cover at least four paths: no tool needed, one tool selected, two sequential tools, and retrieval failure. The billing page should explain each path; otherwise users will mistake a protocol optimization for a price guarantee.
Three common mistakes
- Treating Preview as a stable contract. Keep a switch and a fallback to the complete tool list.
- Testing text only. A 200 response does not prove that a schema was retrieved or that tool output was returned correctly.
- Ignoring protocol differences. Gemini Interactions API, OpenAI-compatible Chat Completions and cloud-provider wrappers are different request contracts.
Launch checklist
- Confirm that both the client and gateway support Interactions API.
- Decide which tools may load lazily and which must remain visible.
- Keep request IDs, usage and tool-call traces.
- Compare cost, latency and success rate across four task types.
- Add a feature flag and old-protocol fallback.
- Explain model tokens, retrieval and retries separately on the billing page.
Tool retrieval addresses schema loading for large tool libraries. It does not make every Gemini request automatically cheaper. Verify the protocol, then the bill, then scale the integration.
1: Google AI for Developers, Gemini API release notes. The November 19, 2026 entry confirms Preview status, defer_loading, tool_search, client retrieval and Gemini 3.6+ support: https://aistudio.google.com/docs/changelog?hl=zh-cn
Sources & attribution
This article references the public materials listed below. Analysis and wording are SalpX's own; quoted material remains the property of its original authors and publishers.
- Gemini API release notes: Tool retrieval and Gemini 4 Neon — Google AI for Developers · accessed 2026-11-20Note:Google's official changelog confirms Tool retrieval preview in the Interactions API on November 19, 2026, with defer_loading, tool_search, client retrieval and Gemini 3.6+ support; it also dates Gemini 4 Neon GA to November 18.
One key for Claude, GPT and 50+ models
The SalpX gateway is OpenAI-SDK compatible. Point base_url at https://www.salpx.com/v1 and you are done.