Brief IA
›

Gemini Offers On-Demand Schema Uploads

Code & Dev·Tom Levy·

Gemini Offers On-Demand Schema Uploads

Gemini Offers On-Demand Schema Uploads
Key Takeaways
1Gemini offers a preview of on-demand retrieval of tool schemas in its Interactions API.
2The activation adds a small fixed volume of incoming tokens; the retrieved schemas remain charged during the conversation.
3The feature supports Gemini 3.6 and later versions, including Gemini 4.
Why it matters : agents can retain the names and descriptions of tools without having to consistently transmit all their parameter schemas.

Gemini has made available in preview a recovery tool in its Interactions API to load parameter schemas on demand. Gemini announces a reduction in latency and the cost of input tokens for complex tasks, but the savings depend on the schemas actually requested.

Billing and Compatible Models

No specific surcharge is applied to this feature: both incoming and outgoing tokens follow the usual rate of the chosen model. However, activating tool_search introduces a fixed, limited volume of incoming tokens. A retrieved schema is then counted as input until the end of the conversation, following the same principle as an initial declaration.

According to Gemini, the gain depends on the weight of the schemas left aside compared to those that are retrieved, a condition generally met with large libraries. Compatibility begins with Gemini 3.6 and extends to subsequent versions, including all Gemini 4 models, in the Interactions API.

The Model Retains Tool Descriptions

The mechanism replaces the systematic sending of the entire library with selective retrieval of schemas. For Gemini, this approach is intended to help agents with numerous tools limit their consumption of incoming tokens while maintaining the accuracy of function selection as they evolve.

La lettre du soirGratuit · 19 h

Le brief IA que les pros lisent chaque soir

Les 7 actus IA du jour, décryptées en 5 min. Gratuit.

Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.

Choisissez votre rythme

Gratuit · Pas de spam · Désabonnement en 1 clic

Configuration involves adding a search tool in the request, followed by setting defer_loading: true on the relevant functions. Their names and descriptions remain accessible to the model; only the parameter schemas are initially excluded from the context. When a function becomes necessary, the model identifies it by name, the API retrieves its complete schema, and then the call is made in the same request. Gemini recommends keeping frequently requested functions loaded immediately.

An Example of Refund

The demonstration case relies on the Python client genai, imported from google, and on the model gemini-4-hydrogen. The request involves refunding $40 for a damaged order, identified as A-1042. The function issue_refund provides a refund to the original payment method; it requires the parameters order_id, a string, and amount, a number. The example also includes more than 50 other functions whose loading is deferred.

The search, schema retrieval, and call are recorded in interaction.steps. According to Gemini, this trace facilitates the review of considered tools when their names or descriptions need to be debugged. A configuration guide with examples is available in the documentation.

Brief IA — L'actualité IA en français

L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.