Agents built on the Gemini API no longer have to send every tool's full parameter schema in each prompt. With Tool Retrieval—now in preview in the Gemini Interactions API—developers can keep hundreds of tools on standby and load only the ones needed for a given request. This change is aimed squarely at teams whose agents have outgrown a handful of functions and now need to manage dozens or hundreds without ballooning token usage or latency.
The stakes are clear: as tool libraries grow, sending every parameter schema in every call drives up input token counts, increases latency, and makes tool selection less reliable. Tool Retrieval addresses this by letting agents see the names and descriptions of all available tools, but deferring the full schema until the model actually needs to use it. The result is faster, leaner, and more accurate tool selection—especially as your agent's responsibilities expand.
Turning on Tool Retrieval
To enable Tool Retrieval, you add a tool_search tool to your Gemini Interactions API request and set defer_loading: true on any tool you want to load lazily. The model gets the name and description of each deferred tool, but not its schema. When it decides it needs a tool, it requests it by name, the API loads the schema, and the function call proceeds—all within the same API call. Example setup:
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,
"parameters": {
"type": "object",
"properties": {
"order_id": {"type": "string"},
"amount": {"type": "number"},
},
"required": ["order_id", "amount"],
},
},
# ... 50+ other deferred functions
]




