Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

附录 B:工具速查表

内置工具一览

工具名分组核心参数功能
shellruntimecommand: string在沙箱中执行 Shell 命令
read_filefspath: string, offset?: int, limit?: int读取文件内容(支持分页)
write_filefspath: string, content: string写入文件(覆盖)
edit_filefspath: string, old_string: string, new_string: string精确字符串替换
diff_editfspath: string, diff: stringDiff 格式编辑
globsearchpattern: string, path?: string文件模式搜索
grepsearchpattern: string, path?: string, include?: string内容正则搜索
list_dirsearchpath: string列出目录内容
web_searchwebquery: string网页搜索
web_fetchweburl: string获取网页内容
browserweburl: string, action?: string浏览器自动化
gitcommand: stringGit 操作(feature: git)
code_structurepath: stringAST 代码结构分析(feature: ast)

辅助工具

工具名类型功能
spawnsessions后台异步执行子 Agent
deep_searchresearch深度网页研究
recall_memorymemory检索长期记忆
save_memorymemory保存到长期记忆
manage_skillsadmin管理 skills
activate_toolsadmin激活延迟工具
send_file发送文件给用户
message发送消息到频道

工具分组策略

分组名包含工具典型策略
group:fsread_file, write_file, edit_file, diff_edit文件操作
group:runtimeshell命令执行
group:webweb_search, web_fetch, browser网络操作
group:searchglob, grep, list_dir代码搜索
group:sessionsspawn后台任务
group:memoryrecall_memory, save_memory记忆操作
group:researchdeep_search, synthesize_research深度研究
group:adminmanage_skills, activate_tools, configure_tool管理操作

策略配置示例

{
  "tools": {
    "allow": ["group:fs", "group:search", "shell"],
    "deny": ["browser", "web_fetch"],
    "byProvider": {
      "ollama": {
        "allow": ["read_file", "shell", "grep"]
      }
    }
  }
}

deny-wins 规则:deny 列表优先于 allow 列表。上例中 browser 被禁止,即使它属于某个允许的分组。