让大模型主动发现并请求工具,实现真正自主的智能代理。
MCP-Zero: Active Tool Discovery for Autonomous LLM Agents
- 模型自主生成工具需求,不依赖预设工具列表。
- 从近3000个工具中准确选择,节省98%调用开销。
- 适合构建可扩展、低资源消耗的智能代理系统。
真正的智能需要主动获取能力,但现有大模型代理通过提示词注入预定义工具模式,使模型沦为被动选择器,难以实现稳健的通用智能体。我们提出MCP-Zero,一种赋予大模型自身工具发现自主权的主动代理框架。该框架不将所有可用工具强加给模型,而是让代理主动识别能力缺口,并按需请求特定工具,从而将模型从大规模检索器转变为真正的自主智能体。核心机制包括:(1) 主动工具请求,模型自动生成结构化请求以明确所需工具;(2) 分层语义路由,两阶段算法通过优化语义对齐匹配请求与对应服务器和工具;(3) 迭代能力扩展,支持跨领域工具链逐步构建,同时保持极小上下文占用。我们构建了MCP-tools数据集,包含来自官方Model-Context-Protocol仓库的308个MCP服务器和2,797个工具。实验表明,MCP-Zero在保持代理自主性的同时实现显著效率提升:(i) 在248.1万词元内从近3000个候选工具中准确选择;(ii) 在APIBank上减少98%的令牌消耗,同时维持高准确率;(iii) 多轮任务表现稳定,且随工具生态增长持续提升。本工作确立主动工具发现为可扩展自主智能体系统的基本设计范式。
原文摘要 · Abstract (English)
True intelligence requires active capability acquisition, yet current LLM agents inject pre-defined tool schemas into prompts, reducing models to passive selectors and falling short of robust general-purpose agency. We introduce MCP-Zero, an active agent framework that restores tool discovery autonomy to LLMs themselves. Instead of overwhelming models with all available tools, MCP-Zero enables agents to actively identify capability gaps, and request specific tools on-demand, transforming them from large-scale retrievers into genuine autonomous agents. The framework operates through three core mechanisms: (1) Active Tool Request, where models autonomously generate structured requests specifying their exact tool requirements; (2) Hierarchical Semantic Routing, a two-stage algorithm that matches requests to relevant servers and tools through improved semantic alignment; (3) Iterative Capability Extension, enabling agents to progressively build cross-domain toolchains while maintaining minimal context footprint. We construct MCP-tools, a comprehensive dataset of 308 MCP servers and 2,797 tools from the official Model-Context-Protocol repository. Experiments demonstrate that MCP-Zero preserves agent autonomy while achieving substantial efficiency gains: (i) accurate tool selection from nearly 3k candidates across 248.1k tokens; (ii) 98\% reduction in token consumption on APIBank while maintaining high accuracy; and (iii) consistent multi-turn performance that scales with tool ecosystem growth. This work establishes active tool discovery as a fundamental design pattern for scalable autonomous agent systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。