Tool Retrieval in the Gemini API

The agent keeps hundreds of tools on standby and loads the full parameter description only when it needs it. Works with MCP servers too.

How to try it

  1. Create an API key in Google AI Studio and use the Interactions API with a Gemini 3.6+ or Gemini 4 model
  2. Add {"type": "tool_search"} to the tools list
  3. Set defer_loading: true on tools you rarely use (for an MCP server it applies to the whole server at once)
  4. Check tool_search_call and function_call in interaction.steps, then return a function_result

Price: No extra charge, you pay standard model tokens

Official link

More new tools