Reference: Tool Presets¶
目的:速查 所有内置工具及其 preset 配置
1. 工具分类¶
| 类别 | 工具数(推测) | 例子 |
|---|---|---|
| 文件 | ~5 | Read, Edit, Write, NotebookEdit |
| Bash | ~3 | Bash, KillBash, BashOutput |
| Agent | ~3 | Agent, SendUserMessage, BriefTool |
| Web | ~3 | WebFetch, WebSearch, WebBrowserTool |
| Todo | ~2 | TodoWrite, TaskCreate / Update |
| Skill | ~1 | Skill |
| 特殊 | ~5+ | AskUserQuestion, ListMcpResources, SyntheticOutput |
~22 类别。
2. 5 大文件工具¶
2.1 Read¶
// tools/FileReadTool/FileReadTool.ts
{
name: 'Read',
description: 'Read a file',
inputSchema: { file_path: string, offset?: number, limit?: number }
}
读文件。
2.2 Edit¶
// tools/EditTool
{
name: 'Edit',
description: 'Edit a file',
inputSchema: { file_path: string, old_string: string, new_string: string }
}
精确编辑。
2.3 Write¶
写文件。
2.4 NotebookEdit¶
notebook 编辑。
2.5 MultiEdit (推测)¶
多文件编辑。
3. 3 大 Bash 工具¶
3.1 Bash¶
{
name: 'Bash',
description: 'Run a bash command',
inputSchema: { command: string, timeout?: number, run_in_background?: boolean }
}
Bash。
3.2 KillBash (推测)¶
Kill。
3.3 BashOutput (推测)¶
{
name: 'BashOutput',
description: 'Get output of background bash',
inputSchema: { shell_id: string, blocking?: boolean }
}
Output。
4. 3 大 Agent 工具¶
4.1 Agent¶
Sub-agent。
4.2 SendUserMessage (KAIROS)¶
{
name: 'SendUserMessage',
description: 'Send a message to the user (assistant mode)',
inputSchema: { message: string }
}
Send to user。
4.3 BriefTool (ANT-ONLY)¶
Brief。
5. 3 大 Web 工具¶
5.1 WebFetch¶
Fetch URL。
5.2 WebSearch (推测)¶
Search。
5.3 WebBrowserTool (FEATURE_GATED)¶
{
name: 'WebBrowser',
description: 'Browse the web interactively',
inputSchema: { action: string, ... }
}
Browse。
6. 2 大 Todo 工具¶
6.1 TodoWrite¶
写 todo。
6.2 TaskCreate / TaskUpdate¶
{
name: 'TaskCreate',
description: 'Create a task',
inputSchema: { description: string }
}
{
name: 'TaskUpdate',
description: 'Update a task',
inputSchema: { task_id: string, status: string }
}
Task 系统。
7. 1 大 Skill 工具¶
Skill。
8. 5 个特殊工具¶
8.1 AskUserQuestion¶
{
name: 'AskUserQuestion',
description: 'Ask the user a question',
inputSchema: { question: string, options: string[] }
}
Ask user。
8.2 ListMcpResources (MCP)¶
List MCP。
8.3 SyntheticOutputTool¶
Synthetic output。
8.4 ListAgents (推测)¶
List agents。
8.5 Quit / Exit (推测)¶
Exit。
9. 工具 preset 模式¶
9.1 隐式 enabled¶
默认。
9.2 显式 enabled¶
显式。
9.3 disable¶
禁用。
9.4 default¶
default。
10. 5 个工具 preset 模板¶
10.1 Read-only¶
只读。
10.2 Code editor¶
编辑器。
10.3 Bash expert¶
Bash 专家。
10.4 Full power¶
全功能。
10.5 Zero tools¶
无工具。
11. 工具 tool_use_id 关联¶
// Claude API 返回
{
type: 'tool_use',
id: 'toolu_xxx', // ← 唯一
name: 'Bash',
input: { command: 'ls' }
}
关联。
11.1 tool_result 关联¶
关联。
12. 工具权限 preset¶
{
"allow": [
"Read", "Edit", "Write", "Bash", "Glob", "Grep"
],
"deny": [
"Bash(rm -rf:*)", "WebFetch"
]
}
preset。
13. 速查¶
工具 类别 风险
──────────────────────────────
Read 文件 低
Edit 文件 中
Write 文件 中
Bash shell 高
Glob 文件 低
Grep 文件 低
Agent meta 中
WebFetch 网络 中
WebSearch 网络 低
WebBrowser 网络 中
TodoWrite meta 低
TaskCreate/Update meta 低
Skill meta 低
AskUserQuestion meta 低
ListMcpResources MCP 中
SyntheticOutput meta 低
16 工具。
14. 总结¶
工具 preset = 预定义工具集合。
核心: - ~22 工具分类 - 8 类别 - 5 preset 模板 - 工具 tool_use_id 关联
下一步: - 选 preset - 测试 - 写自定义工具