sysnote
News

Gemini API can now load tool definitions when an agent needs them

Gemini's Interactions API can now retrieve tool definitions when it needs them, rather than loading the entire catalog into the model's context at the start. Google lists tool retrieval as a November 19 preview, supported on Gemini 3.6 and later, including Gemini 4.

For an agent connected to several services, each tool brings a name, a description and a schema explaining its arguments. Those definitions occupy context even when the current task needs only a few of them. The new mechanism lets developers defer loading functions and remote MCP tools, then supply a tool_search tool to find the relevant definitions.

Google's Python SDK 3.6.0 release, dated November 18, adds the public schemas for this flow. The implementation change exposes defer_loading on MCP servers and makes tool-search calls and results available through the SDK.

Finding a function comes before calling it

The SDK's tests show both server-managed retrieval and a client-managed option. With execution: "client", an application can provide its own search implementation. The returned function definitions travel back in a function-result block, so the model can learn the available arguments before making the actual call.

One test checks this second step specifically: a returned function schema must parse as a function, rather than an unknown result type. The tests also cover streamed tool-search calls and results.

This changes how an agent discovers its tools. Applications still need to execute their custom functions and return the outcomes. Google has not supplied a token-saving percentage in the changelog; the benefit for a particular agent depends on the size of its catalog and which definitions it retrieves.

Comments

No comments yet. Be the first.

Write a comment

Comments are published after review.