️ Claude Code Tools System
Intermediate Guide · 20 min read
✓Based on source code analysis
Overview: 54 Tools
Claude Code provides 54 tools organized into functional groups. Each tool implements a unified interface with execute, permission check, and system prompt description.
Tool Groups
File Operations (6 tools)
| Tool | Function |
|---|---|
FileReadTool | Read files with line range, PDF pages, Notebook rendering |
FileWriteTool | Write/create files with pre-checks |
FileEditTool | Precise string replacement with unique match |
GlobTool | File pattern matching (e.g., **/*.ts) |
GrepTool | Content search via ripgrep |
NotebookEditTool | Jupyter Notebook cell editing |
Execution (3 tools)
| Tool | Function |
|---|---|
BashTool | Shell commands with 25 security checks |
PowerShellTool | Windows PowerShell execution |
REPLTool | VM sandbox execution (ANT only) |
Agent (2 tools)
| Tool | Function |
|---|---|
AgentTool | Spawn sub-agents with 3 isolation modes |
SendMessageTool | Inter-agent messaging |
Web (2 tools)
| Tool | Function |
|---|---|
WebSearchTool | Web search via Anthropic API |
WebFetchTool | URL fetching with HTML→Markdown |
MCP (3 tools)
| Tool | Function |
|---|---|
MCPTool | MCP tool call template |
ListMcpResourcesTool | List MCP server resources |
ReadMcpResourceTool | Read specific MCP resource |
Task Management (6 tools)
| Tool | Function |
|---|---|
TaskCreateTool | Create background tasks |
TaskGetTool | Get task status |
TaskListTool | List active tasks |
TaskOutputTool | Get task output |
TaskStopTool | Stop running task |
TaskUpdateTool | Update task parameters |
Mode Switch (4 tools)
| Tool | Function |
|---|---|
EnterPlanModeTool | Enter read-only plan mode |
ExitPlanModeTool | Exit plan mode |
EnterWorktreeTool | Enter Git worktree isolation |
ExitWorktreeTool | Exit worktree |
KAIROS Exclusive (4 tools)
| Tool | Function |
|---|---|
SleepTool | AI主动睡眠 (non-blocking) |
SendUserFileTool | Proactively send files to user |
PushNotificationTool | Push notifications to device |
SubscribePRTool | GitHub PR subscription |
Other Tools (12+ tools)
SkillTool- Execute custom skillsLSPTool- Language Server Protocol operationsBriefTool- KAIROS concise interactionTodoWriteTool- Task list managementToolSearchTool- Lazy loading hub for deferred toolsScheduleCronTool- Cron schedulingTeamCreateTool/TeamDeleteTool- Multi-agent teams
Tool Interface
All tools implement unified interface:
interface Tool {
name: string;
description: string;
inputSchema: JSONSchema;
execute(input, context): AsyncGenerator
Lazy Loading Mechanism
Model initially sees only ~15 core tools. Remaining tools loaded via ToolSearchTool:
- Keyword search: "notebook jupyter" → NotebookEditTool
- Exact selection: "select:MCPTool,LSPTool" → Direct load
💡 Pro Tip: See Tools Reference for complete source code analysis of all 54 tools.