️ 54 Tools Breakdown

Complete analysis of Claude Code's tool system

Tool Interface (Tool.ts - 792 lines)

interface Tool {
  name: string;
  description: string;
  inputSchema: JSONSchema;
  execute(input, context): AsyncGenerator;
  isAllowed(input, context): PermissionDecision;
  prompt(): string;
  needsPermission(input): boolean;
}

File Operations (6 tools)

  • FileReadTool - Read with line range, PDF, Notebook
  • FileWriteTool - Write/create with pre-checks
  • FileEditTool - Precise string replacement
  • GlobTool - File pattern matching
  • GrepTool - ripgrep-based content search
  • NotebookEditTool - Jupyter cell editing

Execution (3 tools)

  • BashTool - Shell with 25 security checks
  • PowerShellTool - Windows PowerShell
  • REPLTool - VM sandbox (ANT only)

Agent (2 tools)

  • AgentTool - Sub-agent with 3 isolation modes
  • SendMessageTool - Inter-agent messaging

Web (2 tools)

  • WebSearchTool - Anthropic search API
  • WebFetchTool - URL fetching + summarization

MCP (3 tools)

  • MCPTool - MCP tool call template
  • ListMcpResourcesTool - List resources
  • ReadMcpResourceTool - Read resource

Task Management (6 tools)

  • TaskCreateTool - Create background tasks
  • TaskGetTool - Get task status
  • TaskListTool - List active tasks
  • TaskOutputTool - Get task output
  • TaskStopTool - Stop running task
  • TaskUpdateTool - Update parameters

Mode Switch (4 tools)

  • EnterPlanModeTool - Read-only plan mode
  • ExitPlanModeTool - Exit plan mode
  • EnterWorktreeTool - Git worktree isolation
  • ExitWorktreeTool - Exit worktree

KAIROS Exclusive (4 tools)

  • SleepTool - Non-blocking AI sleep
  • SendUserFileTool - Proactive file send
  • PushNotificationTool - Push notifications
  • SubscribePRTool - GitHub PR subscription

Other Tools (12+ tools)

  • SkillTool - Execute custom skills
  • LSPTool - Language Server Protocol
  • BriefTool - KAIROS concise interaction
  • TodoWriteTool - Task list management
  • ToolSearchTool - Lazy loading hub
  • TeamCreateTool / TeamDeleteTool - Multi-agent teams

Lazy Loading Mechanism

Model initially sees ~15 core tools. Remaining loaded via ToolSearchTool:

  • Keyword search: "notebook jupyter" → NotebookEditTool
  • Exact selection: "select:MCPTool,LSPTool" → Direct load
💡 See also: Tools Reference (MD) for complete source code analysis.