2.1 KiB
2.1 KiB
title, created, updated, type, source, arxiv_id, version
| title | created | updated | type | source | arxiv_id | version |
|---|---|---|---|---|---|---|
| MCP-Zero: Active Tool Discovery for Autonomous LLM Agents | 2026-06-19 | 2026-06-19 | paper-raw | https://arxiv.org/abs/2506.01056 | 2506.01056 | v4 |
MCP-Zero: Active Tool Discovery for Autonomous LLM Agents
Authors: Xiang Fei, Xiawu Zheng*, Hao Feng (Xiamen University, USTC) Published: 2025-06-01 (v4: 2025-06-24) Venue: arXiv:2506.01056 (cs.AI, cs.SE) Code: https://github.com/xfey/MCP-Zero
核心洞察
当前 LLM Agent 的工具使用是被动的——将所有 tool schema 注入 system prompt 让模型从中选择。这有两个致命问题:(1) 上下文开销爆炸(GitHub MCP server 一个就需要 4600+ tokens,全生态 248K tokens);(2) 决策自主权被剥夺——模型从"自主能力构建者"退化为"被动选择器"。
MCP-Zero 将范式翻转为主动工具发现(Active Tool Discovery):Agent 自主识别能力缺口,按需生成结构化工具请求,系统匹配并返回。
三大机制
1. Active Tool Request
模型自主生成结构化请求:
<tool_assistant>
server: File system allowing file operations
tool: Read file by filename
</tool_assistant>
关键:请求在工具文档的语义空间中,语义对齐度高于原始用户查询。
2. Hierarchical Semantic Routing
两级粗到细检索:
- 第一级:server 字段 → 匹配 server 描述(含增强摘要)
- 第二级:tool 字段 → 在选中的 server 内排序
- 评分:score = (s_server × s_tool) × max(s_server, s_tool)
- 复杂度从 O(n) 降至 O(m+k),m+k ≪ n
3. Iterative Capability Extension
支持多轮迭代发现:模型可逐步构建跨域 toolchain(文件→编辑→执行),当前工具不足时可优化请求重新检索。
关键数据
- 数据集 MCP-tools:308 servers, 2,797 tools
- APIBank 上 token 消耗降低 98% 且保持高准确率
- 在 248.1K tokens 的工具描述空间中精准选择
理论分析
- 主动发现建模为 active learning:r* = arg max I(T*; r|s_t)
- 注意力分布:被动 O(1/n) ↘ 主动 O(1/k),k ≪ n
- 语义对齐优势:cos(e_r, e_t) > cos(e_q, e_t)