Files
myWiki/concepts/meta-tools.md

49 lines
1.7 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: "Meta Tools — 管理工具的工具"
created: 2026-06-19
updated: 2026-06-19
type: concept
tags: [meta-tools, tool-management, dynamic-tool-selection, mcp]
sources:
- https://arxiv.org/abs/2509.20386
---
# Meta Tools
## 定义
Meta Tools 是 Dynamic ReAct 框架中**管理其他工具的特殊工具集**——始终对 LLM 可用,负责工具的发现、搜索、加载和执行。是将"被动工具选择"转化为"主动工具管理"的关键机制。
## 核心 Meta Tools
| Meta Tool | 功能 | 所属架构 |
|-----------|------|---------|
| **search_tools** | 两级搜索k1=20 候选 → 去重 → 每应用 k2=5 | Search and Load |
| **load_tools** | LLM 精选后显式加载并绑定 | Search and Load |
| **search_apps** | 先定位应用再搜工具 | Application-Aware |
| **get_tool_info** | 返回 docstring + input/output schema | Fixed Tool Set |
| **call_tool** | 通过 ID 和参数执行工具 | Fixed Tool Set |
## Search and Load 中的 Meta Tools生产选择
```
LLM 构造多查询 → search_tools(多查询, k1=20, k2=5)
→ 去重返回候选 → LLM 精选 → load_tools(精选ID列表)
→ 工具绑定 → 执行
```
关键设计决策:
- 多查询合并一次 `search_tools` 调用(减少 LLM 轮次)
- 每应用 k2=5 上限防止单一应用工具泛滥
- `load_tools` 后 LLM 通常只加载 < 5 个工具
## 与 System Prompt 的关系
轻量 system prompt 是前提——LLM 在指令过多时会停止遵循Meta tools 将操作控制从 prompt 转移到工具接口降低 prompt 脆弱性提升与第三方 MCP client 的兼容性
## 参考
- [[dynamic-react|Dynamic ReAct]]
- [[search-and-load|Search and Load]]
- [[gaurav-dynamic-react-2025|论文]]