C Claude Code Internals
| EN | ES

工具

Claude Code 有 45 个内置工具,分为 9 个类别。系统提示词明确指示 Claude 尽可能优先使用专用工具而不是通用 Bash 命令。

35 内置工具 9 类别 5 条件工具

专用工具规则

系统提示词明确告诉 Claude 使用专用工具而不是 Bash 进行常见操作。 这提高了透明度并使工具调用可审查。

代替 使用
cat / head / tail / sed Read
sed / awk Edit
echo > / heredoc Write
find / ls Glob
grep / rg Grep

按类别列出所有工具

Files

Read, write, edit and search the filesystem

6 tools
Read Write Edit Glob Grep NotebookEdit

Shell

Execute commands in the terminal

3 tools
Bash PowerShell REPL

Web

Fetch URLs and search the internet

2 tools
WebFetch WebSearch

Agents

Spawn and communicate with sub-agents

4 tools
Agent SendMessage TeamCreate TeamDelete

Planning

Enter plan mode and manage git worktrees

4 tools
EnterPlanMode ExitPlanMode EnterWorktree ExitWorktree

Tasks

Create and track work items in the current session

5 tools
TaskCreate TaskUpdate TaskStop TaskOutput TodoWrite

Scheduling

Create cron jobs and remote triggers

4 tools
CronCreate CronDelete CronList RemoteTrigger

UI

Interact with the user and invoke skills

3 tools
AskUserQuestion Brief SkillTool

MCP

Model Context Protocol: connect external tools

4 tools
MCPTool ListMcpResources ReadMcpResource McpAuth

条件工具(功能标志)

某些工具仅在启用特定功能标志时出现。它们在标准 Claude Code 安装中不可用。

SleepTool
PROACTIVE / KAIROS

Pauses execution in autonomous mode. Required when there is nothing useful to do. Claude must never respond without calling sleep.

CronTools
AGENT_TRIGGERS

CronCreate, CronDelete, CronList: only available when the scheduling feature flag is enabled.

MonitorTool
MONITOR_TOOL

Performance and observability monitoring. Behind a separate feature flag.

WebBrowserTool
WEB_BROWSER_TOOL

Full browser automation (beyond WebFetch). Available when the browser tool flag is on.

REPLTool
Internal Anthropic users only

Interactive REPL execution. Not available to external users.

i Bash 保留用于其他用途
Bash 用于没有专用工具的系统命令和操作。如果 Claude 使用 Bash 读取文件或搜索代码, 它就没有遵循自己的提示词规则。你可以通过说"直接使用 Read/Grep 工具"来提醒它。