Files
myWiki/papers/fei-mcp-zero-2025.md

72 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "MCP-Zero主动工具发现"
created: 2026-06-19
updated: 2026-06-19
type: paper
tags: [active-tool-discovery, mcp, llm-agents, tool-use, semantic-routing, context-efficiency]
sources:
- https://arxiv.org/abs/2506.01056
- https://github.com/xfey/MCP-Zero
---
# MCP-Zero主动工具发现
> **Xiang Fei, Xiawu Zheng, Hao Feng** (厦大/中科大) · 2025 · arXiv:2506.01056
## 核心问题
当前 LLM Agent 的工具使用范式本质上是**被动的**——将所有 tool schema 注入 context让模型从预定义选项中挑选。两个致命后果
1. **上下文膨胀**:单个 GitHub MCP server 4600+ tokens全 MCP 生态 248K tokens
2. **自主权剥夺**:模型从"自主能力构建者"退化为"被动选择器"
## 核心策略:主动工具发现
> **从"给你所有工具自己挑"翻转为"告诉我你需要什么,我来找"。**
```
被动范式: 所有 tool schema → Context → LLM 选择
主动范式: LLM 生成 <tool_request> → 语义匹配 → 返回精确工具
```
## 三大机制
### 1. [[active-tool-request|Active Tool Request]]
模型自主生成结构化请求,指定 server平台/权限域)和 tool操作类型+目标),请求在工具文档的语义空间中——对齐度天然优于原始用户查询。
### 2. [[hierarchical-semantic-routing|Hierarchical Semantic Routing]]
两级检索:先匹配 server含增强摘要再在选中 server 内排序 tool。复杂度 O(n)→O(m+k)m+k ≪ n。
### 3. [[iterative-capability-extension|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)
- 语义对齐优势cos(e_r, e_t) > cos(e_q, e_t)agent 请求在工具描述空间中
- 注意力效率:被动 O(1/n) → 主动 O(1/k)
## 与 Agent Harness 的关联
MCP-Zero 直接解决了 [[agent-skill|Agent Skills]] 框架中"操作维度"的工具发现问题:不是预加载 300 个 tool schema而是让 Agent 在运行时按需请求。这与 [[skill-retrieval|Skill Retrieval]] 的"检索而非全加载"思路一脉相承。
## 关键概念
- [[active-tool-discovery|主动工具发现]] — 范式转变
- [[active-tool-request|Active Tool Request]] — 结构化请求机制
- [[hierarchical-semantic-routing|层次语义路由]] — 两级匹配
- [[iterative-capability-extension|迭代能力扩展]] — 跨域 toolchain
- [[mcp-protocol|MCP 协议]] — 标准化工具接口
- [[mcp-tools-dataset|MCP-tools 数据集]]
来源:[原始存档](raw/papers/fei-mcp-zero-2025.md)