Gemini API 新增工具检索,用更少 Token 接入数百个工具
Gemini API adds tool retrieval to expose hundreds of tools with fewer tokens
Google 在 Gemini API 预览版加入 Tool Retrieval,让 Agent 面对数百个工具时先检索相关工具,而不是把所有定义和 schema 一次性塞进上下文[1]。它解决工具规模扩大后 Token 成本、选择干扰和上下文窗口三重压力,技术路径是把工具目录变成可检索索引,再只向模型暴露当前请求可能需要的子集。参考价值是工具检索将成为 Agent 运行时的基础层;限制是漏召回、工具描述含糊和相似工具混淆可能让模型直接走错流程。
Google added Tool Retrieval to the Gemini API in preview so agents can retrieve relevant tools instead of placing every definition and schema in context when hundreds are available[1]. It addresses token cost, selection distraction and context limits as tool catalogues expand by turning the catalogue into a searchable index and exposing only the subset likely relevant to the current request. The reference is tool retrieval becoming a foundational agent-runtime layer; the limitation is that recall misses, vague descriptions and near-duplicate tools can send the model down the wrong workflow.