Google has introduced Tool Retrieval for the Gemini API, a new feature currently available in preview that allows developers to scale the capabilities of their AI agents. Previously, developers typically had to define every available tool within the model’s prompt, which consumed significant context window space. This update enables agents to dynamically access a library of hundreds of tools, selecting only the relevant ones for a specific query.
By using a retrieval system instead of manual prompt inclusion, the feature significantly reduces the number of tokens used during inference. This change allows for more cost-effective and complex agentic workflows, enabling Gemini-powered applications to interact with extensive sets of software tools and data sources without exceeding prompt length limits.

