Appendix B: Complete Tool Inventory

This appendix lists all tools registered in the Claude Code architecture, indexed by functional category. Tools are the fundamental capability units through which the agent interacts with the external world. Each tool is registered in the tool registry via a unified interface protocol and is dispatched by the conversation main loop.

Permission Model Field Definitions:

  • readOnly: Whether the tool only performs read operations and does not modify the file system or external state. Read-only tools typically have more relaxed permission constraints and can be used in plan mode.
  • destructive: Whether the tool performs irreversible operations (deletion, overwriting, sending). Destructive tools undergo stricter scrutiny during permission checks.
  • concurrencySafe: Whether the tool can be safely executed in parallel (no dependency on shared mutable state). Concurrency-safe tools can be dispatched simultaneously by the streaming tool executor.

In the tables, true/false indicates the value is always returned; dynamic indicates runtime determination based on input parameters. Methods not explicitly overridden in the source code use the buildTool defaults (all false).

Cross-Reference: The tool definition protocol is detailed in Appendix A.4.3, “Standard Protocol of the Tool Type System”; tool registration and discovery mechanisms are described in Chapter 3; the tool permission check flow is described in Appendix A.3, “Permission Determination Path.”

flowchart LR
    subgraph FileOps["File Operations"]
        FR["FileReadTool"]
        FW["FileWriteTool"]
        FE["FileEditTool"]
        NB["NotebookEditTool"]
    end

    subgraph Search["Search"]
        GB["GlobTool"]
        GP["GrepTool"]
        TS["ToolSearchTool"]
    end

    subgraph Execution["Execution"]
        Bash["BashTool"]
        PS["PowerShellTool"]
    end

    subgraph Network["Network"]
        WF["WebFetchTool"]
        WS["WebSearchTool"]
    end

    subgraph Agent["Agent"]
        AT["AgentTool"]
        SM["SendMessageTool"]
        TC["TeamCreateTool"]
    end

    subgraph Other["Other"]
        TD["TodoWriteTool"]
        LSP["LSPTool"]
        MC["MCP Tools"]
        CR["Cron Tools"]
    end

    classDef ro fill:#8fbc8f,stroke:#5a8a5a,color:#fff
    classDef rw fill:#4a90d9,stroke:#2c5f8a,color:#fff
    classDef dyn fill:#ff9800,stroke:#e65100,color:#fff

    class FR,GB,GP,TS,WF,WS ro
    class FW,FE,NB,AT,SM,TC,TD rw
    class Bash,PS dyn

1. File Operations

File operation tools are the foundational capabilities for the agent to process code and data. This group of tools covers the complete file operation chain from reading to editing to creation.

Tool NamereadOnlydestructiveconcurrencySafeDescription
FileReadTooltruefalsetrueReads file content; supports line number ranges, PDF pagination, images, and notebook formats
FileWriteToolfalsefalsefalseWrites files, overwriting existing content or creating new files
FileEditToolfalsefalsefalsePrecise string-replacement editing; supports single-instance and global replacement
NotebookEditToolfalsefalsefalseEdits Jupyter Notebook cells (replace/insert/delete)

Usage Scenario Details:

  • FileReadTool: Suitable for code review (reading large files in segments), document analysis (PDF paginated reading), image understanding (multimodal input), and similar scenarios. Its concurrency safety allows multiple files to be read simultaneously to accelerate information gathering.
  • FileWriteTool: Suitable for creating new files (e.g., configuration files, scaffolded code) or completely rewriting file content. Since writing is irreversible, it is recommended to use FileReadTool first to confirm the current content of important files.
  • FileEditTool: Suitable for precisely modifying specific content within existing files. Its string matching mechanism ensures accurate modification placement, and the replace_all mode supports batch renaming and similar operations. This is the most commonly used tool for day-to-day code editing.
  • NotebookEditTool: Designed specifically for Jupyter Notebooks, supporting insertion of code or markdown cells at specific positions, modification of existing cell content, and deletion of cells. Suitable for data analysis and scientific computing scenarios.

Inter-Tool Collaboration Patterns: A typical code modification workflow follows FileReadTool -> Analysis -> FileEditTool/FileWriteTool. First read to understand the current state, then decide whether to use precise editing or a complete rewrite.

Search tools are the foundational capabilities for the agent to locate information in a codebase. File name search and content search complement each other, covering the complete search spectrum from structural positioning to semantic lookup.

Tool NamereadOnlydestructiveconcurrencySafeDescription
GlobTooltruefalsetrueFile name glob pattern matching search, sorted by modification time
GrepTooltruefalsetrueRegex-based content search powered by ripgrep, supports multiple output modes
ToolSearchToolfalsefalsefalseTool discovery search; matches lazily loaded tools by keyword

Usage Scenario Details:

  • GlobTool: Suitable for finding files by type (e.g., **/*.ts), by directory structure (e.g., src/**/*.test.js), or by modification time (most recently changed files appear first). Commonly used for project structure exploration and changed file identification.
  • GrepTool: Suitable for searching for specific patterns in file content with regex support. Three output modes (files_with_matches, content, count) address different needs. Commonly used for API usage lookup, configuration item location, and code pattern analysis.
  • ToolSearchTool: When the number of available tools is large (especially after enabling MCP dynamic tools), this tool helps the model quickly locate the needed tool by keyword, avoiding the need to include all tool descriptions in the context.

Recommended Search Strategies:

  • When exploring an unfamiliar project: use GlobTool first to understand the file structure, then use GrepTool to search for key symbols.
  • When locating specific code: GrepTool’s content mode is the most efficient.
  • When measuring code scale: GrepTool’s count mode combined with GlobTool’s file list.

3. Execution

Execution tools are the bridge between the agent and the operating system. BashTool is one of the most versatile tools; nearly all command-line operations are performed through it.

Tool NamereadOnlydestructiveconcurrencySafeDescription
BashTooldynamicfalsedynamicShell command execution; read-only commands can run in parallel, write commands run serially. Permission is dynamically determined based on command content.
PowerShellTooldynamicfalsedynamicWindows PowerShell command execution (conditionally enabled, functionally equivalent to BashTool)

Usage Scenario Details:

  • BashTool: This is one of the most frequently used tools in Claude Code. Suitable for: building and testing (npm test, cargo build), version control (git operations), system administration (file operations, process management), script execution, package management, and more. Its readOnly and concurrencySafe attributes are dynamically determined based on command content.
  • PowerShellTool: Automatically replaces BashTool in Windows environments, providing equivalent command execution capability. Only enabled when a Windows PowerShell environment is detected.

Special Mechanisms of Execution Tools:

  • Read-Only Detection: BashTool internally maintains a list of read-only commands. Matched commands (e.g., ls, cat, git status) are marked as readOnly and can be executed under more relaxed permission conditions.
  • Parallel Execution: When multiple BashTool invocations are all determined to be concurrencySafe, the streaming tool executor can dispatch them in parallel, significantly improving efficiency.
  • Timeout Management: Long-running commands have a timeout mechanism to prevent indefinite blocking.
  • Output Truncation: Command output is truncated when it exceeds the limit, with the remainder persisted to disk.

4. Network

Network tools provide the agent with the ability to access internet information, including two complementary approaches: web content fetching and web searching.

Tool NamereadOnlydestructiveconcurrencySafeDescription
WebFetchTooltruefalsetrueFetches URL content and converts it to markdown
WebSearchTooltruefalsetruePerforms web search, returning structured search results

Usage Scenario Details:

  • WebFetchTool: Suitable for obtaining the complete content of a specific web page (e.g., API documentation, technical blogs). Converts HTML to markdown format for easier model comprehension and citation. Commonly used for consulting the latest documentation and verifying technical details.
  • WebSearchTool: Suitable for open-ended information queries. Returns structured search results (titles, summaries, links) to help the model quickly learn the latest information on a topic. Commonly used for technical research and issue investigation.

Combined Usage Pattern: First use WebSearchTool for a broad search, then use WebFetchTool to deeply retrieve specific page content once relevant resources are identified.

5. Agent

Agent tools implement Claude Code’s recursive composition capability, allowing agents to create and manage sub-agents, communicate among multiple agents, and form collaborative teams.

Tool NamereadOnlydestructiveconcurrencySafeDescription
AgentToolfalsefalsefalseLaunches sub-agents (built-in/custom), supports fork, resume, and background execution
SendMessageTooldynamicfalsefalseSends messages to other agents or channels; plain text messages are readOnly
TeamCreateToolfalsefalsefalseCreates multi-agent teams (conditionally enabled: Agent Swarms mode)
TeamDeleteToolfalsefalsefalseDeletes a created team

Usage Scenario Details:

  • AgentTool: The core sub-agent management tool. Suitable for decomposing complex tasks into subtasks for parallel processing, invoking built-in agents (e.g., ExploreAgent, PlanAgent) to complete specific phases, and performing high-risk operations in an isolated context. See Chapter 9 for sub-agent details.
  • SendMessageTool: Used for cross-agent communication in multi-agent scenarios. Supports sending messages to specific agents or channels. See Chapter 10 for the coordinator pattern.
  • TeamCreateTool / TeamDeleteTool: Used in Agent Swarms mode to create and manage multi-agent teams. Agents within a team can process their assigned subtasks in parallel.

6. Task Management

Task management tools provide lifecycle management capabilities for background tasks, with complete control from creation to monitoring to termination.

Tool NamereadOnlydestructiveconcurrencySafeDescription
TaskCreateToolfalsefalsefalseCreates a background task (conditionally enabled: Todo V2)
TaskGetTooltruefalsetrueGets details of a single task
TaskUpdateToolfalsefalsefalseUpdates task status/content
TaskListTooltruefalsetrueLists all tasks
TaskOutputTooldynamicfalsedynamicGets task output stream; concurrencySafe when readOnly
TaskStopToolfalsefalsetrueStops a running task

Usage Scenario Details: The task management toolset forms a complete CRUD + monitoring interface. A typical workflow is: TaskCreateTool to create a task TaskListTool to check progress TaskGetTool to inspect details TaskOutputTool to retrieve output TaskStopTool to stop the task when needed.

7. Plan

Plan mode tools provide safe planning capabilities, allowing the agent to formulate a plan before executing.

Tool NamereadOnlydestructiveconcurrencySafeDescription
EnterPlanModeTooltruefalsetrueEnters plan mode, restricting to the read-only tool set
ExitPlanModeV2TooltruefalsetrueExits plan mode, restoring normal tool permissions

Usage Scenario Details: Plan mode is a safety strategy. Once entered, the agent can only use read-only tools (such as FileReadTool, GrepTool) for information gathering and analysis, and cannot perform any modification operations. Suitable for designing plans, assessing risks, and analyzing impact before executing complex changes. See Chapter 14 for structured workflows.

8. Worktree

Worktree tools provide file-system-level isolation for parallel tasks.

Tool NamereadOnlydestructiveconcurrencySafeDescription
EnterWorktreeToolfalsefalsefalseCreates a git worktree and switches the working directory (conditionally enabled)
ExitWorktreeToolfalsefalsefalseExits the worktree, preserving or removing the working directory

Usage Scenario Details: Worktree tools implement working directory isolation based on git worktree. Suitable for avoiding file conflicts when multiple sub-agents handle different tasks in parallel, making experimental modifications without affecting the main workspace, and working on different branches simultaneously.

9. Scheduling

Scheduling tools provide time-driven automation capabilities, allowing agents to execute tasks on a schedule.

Tool NamereadOnlydestructiveconcurrencySafeDescription
CronCreateToolfalsefalsefalseCreates a cron scheduled task (conditionally enabled: AGENT_TRIGGERS)
CronDeleteToolfalsefalsefalseDeletes a cron scheduled task
CronListTooltruefalsetrueLists all cron scheduled tasks
RemoteTriggerTooldynamicfalsefalseRemote trigger management (conditionally enabled: AGENT_TRIGGERS_REMOTE)

Usage Scenario Details: The scheduling toolset implements time-driven automation for agents. CronCreateTool supports standard cron expressions for defining execution schedules, suitable for periodic code reviews, automated testing, scheduled report generation, and similar scenarios. RemoteTriggerTool extends triggering capabilities to remote environments.

10. Interaction

Interaction tools manage the agent’s interactions with users and other system components.

Tool NamereadOnlydestructiveconcurrencySafeDescription
AskUserQuestionTooltruefalsetrueAsks the user a question and waits for a reply
SkillToolfalsefalsefalseInvokes a registered slash command skill
ConfigTooldynamicfalsefalseRuntime configuration viewing/modification (ant build only)

Usage Scenario Details:

  • AskUserQuestionTool: When the agent encounters ambiguity or needs additional information during execution, it uses this tool to ask the user a question. This is the proactive communication channel between the agent and the user.
  • SkillTool: Invokes slash commands registered through the skill system. Skills are extensible capability packages that expand the agent’s domain-specific expertise through prompt templates and tool definitions. See Chapter 11 for the skill system.

11. MCP

MCP tools provide the ability to interact with MCP servers, enabling the agent to access external resources.

Tool NamereadOnlydestructiveconcurrencySafeDescription
ListMcpResourcesTooltruefalsetrueLists resources provided by MCP servers
ReadMcpResourceTooltruefalsetrueReads a specific resource on an MCP server

Usage Scenario Details: MCP tools are the resource access interface for the Model Context Protocol client. ListMcpResourcesTool is used to discover available external resources (e.g., database tables, API endpoints), and ReadMcpResourceTool is used to read the content of a specific resource. Both tools are read-only and can be safely executed in parallel. See Chapter 12 for MCP integration.

12. Other

Tool NamereadOnlydestructiveconcurrencySafeDescription
TodoWriteToolfalsefalsefalseTodo panel writer (UI-linked, results not rendered to transcript)
BriefToolfalsefalsetrueControls output brevity mode
LSPTooltruefalsetrueLSP Language Server Protocol operations (conditionally enabled: ENABLE_LSP_TOOL)
SleepToolfalsefalsefalseDelayed wait (conditionally enabled: PROACTIVE / KAIROS)
TungstenToolfalsefalsefalseInternal tool (ant build only)
SyntheticOutputTooltruefalsetrueSynthetic output tool (internal infrastructure)
SnipToolfalsefalsefalseHistory message trimming (conditionally enabled: HISTORY_SNIP)
MonitorToolfalsefalsefalseMonitor tool (conditionally enabled: MONITOR_TOOL)
WorkflowToolfalsefalsefalseWorkflow script execution (conditionally enabled: WORKFLOW_SCRIPTS)
ListPeersToolfalsefalsefalseLists peer agents (conditionally enabled: UDS_INBOX)
REPLToolfalsefalsefalseREPL wrapper, provides Bash/Read/Edit in a VM (ant build only)
SuggestBackgroundPRToolfalsefalsefalseSuggests background PR creation (ant build only)
WebBrowserToolfalsefalsefalseBrowser tool (conditionally enabled: WEB_BROWSER_TOOL)
SendUserFileToolfalsefalsefalseSends a file to the user (conditionally enabled: KAIROS)
PushNotificationToolfalsefalsefalsePush notification (conditionally enabled: KAIROS)
SubscribePRToolfalsefalsefalsePR webhook subscription (conditionally enabled: KAIROS_GITHUB_WEBHOOKS)
CtxInspectToolfalsefalsefalseContext inspector (conditionally enabled: CONTEXT_COLLAPSE)
TerminalCaptureToolfalsefalsefalseTerminal screenshot capture (conditionally enabled: TERMINAL_PANEL)
VerifyPlanExecutionToolfalsefalsefalsePlan execution verification (conditionally enabled: CLAUDE_CODE_VERIFY_PLAN)
OverflowTestToolfalsefalsefalseOverflow test tool (for internal testing)
TestingPermissionTooltruefalsetruePermission testing tool (NODE_ENV=test only)

Tool Enablement Conditions Quick Reference

Some tools are conditionally enabled through feature flags or environment variables. The table below lists all conditionally enabled tools and their corresponding flags:

Condition IdentifierEnabled ToolsReferenced Chapter
USER_TYPE === 'ant'ConfigTool, TungstenTool, REPLTool, SuggestBackgroundPRTool
PROACTIVE / KAIROSSleepToolChapter 5
AGENT_TRIGGERSCronCreateTool, CronDeleteTool, CronListToolChapter 9
AGENT_TRIGGERS_REMOTERemoteTriggerToolChapter 9
MONITOR_TOOLMonitorToolChapter 7
KAIROSSendUserFileTool, PushNotificationToolChapter 6
KAIROS_GITHUB_WEBHOOKSSubscribePRToolChapter 6
ENABLE_LSP_TOOLLSPToolChapter 7
WORKFLOW_SCRIPTSWorkflowToolChapter 9
HISTORY_SNIPSnipToolChapter 4
UDS_INBOXListPeersToolChapter 7
WEB_BROWSER_TOOLWebBrowserToolChapter 7
CONTEXT_COLLAPSECtxInspectToolChapter 4
TERMINAL_PANELTerminalCaptureToolChapter 12
COORDINATOR_MODECoordinator mode additionally enables AgentTool, TaskStopTool, SendMessageToolChapter 8
Todo V2TaskCreateTool, TaskGetTool, TaskUpdateTool, TaskListTool
Agent SwarmsTeamCreateTool, TeamDeleteToolChapter 8
Worktree ModeEnterWorktreeTool, ExitWorktreeToolChapter 9
CLAUDE_CODE_SIMPLESimplified mode retains only BashTool, FileReadTool, FileEditTool
ToolSearchToolSearchToolChapter 3
CLAUDE_CODE_VERIFY_PLANVerifyPlanExecutionToolChapter 14

Cross-Reference: For detailed descriptions of feature flags, see Appendix C; for the dynamic tool registration mechanism, see Appendix A.3, “MCP Tool Dynamic Registration Path.”


Tool Registration Flow

All tools are created through a unified tool factory function, which fills in safe default values for methods not explicitly defined:

  • isEnabled() defaults to returning true
  • isReadOnly() defaults to returning false
  • isConcurrencySafe() defaults to returning false
  • isDestructive() defaults to returning false
  • checkPermissions() defaults to returning allow
  • toAutoClassifierInput() defaults to returning an empty string
  • userFacingName() defaults to returning the tool name

The tool registration entry point is in the global tool registration function, which returns an array of tools. At runtime, the tool pool assembly function merges built-in tools with MCP dynamic tools, sorts them by name, and deduplicates them (built-in tools take priority).

flowchart TD
    A["buildTool Factory Function<br/>Fills Safe Defaults"] --> B["Global Tool Registration Function<br/>Returns Built-in Tool Array"]
    C["MCP Server<br/>Dynamic Tool Discovery"] --> D["MCP Tool Adapter<br/>Converts to Internal Interface"]
    B --> E["Tool Pool Assembly Function"]
    D --> E
    E --> F["Sort by Name"]
    F --> G["Deduplicate<br/>Built-in Tools Take Priority"]
    G --> H["Final Tool Registry"]

    classDef factory fill:#4a90d9,stroke:#2c5f8a,color:#fff
    classDef builtin fill:#8fbc8f,stroke:#5a8a5a,color:#fff
    classDef mcp fill:#ce93d8,stroke:#7b1fa2,color:#fff
    classDef merge fill:#ff9800,stroke:#e65100,color:#fff
    classDef result fill:#66bb6a,stroke:#2e7d32,color:#fff

    class A,B builtin
    class C,D mcp
    class E,F,G merge
    class H result

The following lists several common tool composition patterns to help readers understand the collaborative relationships between tools:

Pattern 1: Code Exploration and Understanding

flowchart LR
    GlobTool --> GrepTool --> FileReadTool

First use GlobTool to locate the file structure, use GrepTool to search for key symbols, and use FileReadTool to read the specific code.

Pattern 2: Code Modification

flowchart LR
    FileReadTool --> FileEditTool --> BashTool["BashTool<br/>(test)"]

First read the target file, use FileEditTool for precise modification, then use BashTool to run tests for verification.

Pattern 3: Information Research

flowchart LR
    WebSearchTool --> WebFetchTool --> FileWriteTool

First use WebSearchTool to search for related information, use WebFetchTool to retrieve specific page content, and finally use FileWriteTool to compile the results.

Pattern 4: Multi-Task Parallelism

flowchart TD
    Fork["AgentTool fork"] --> SA1["Sub-agent 1"]
    Fork --> SA2["Sub-agent 2"]
    Fork --> SA3["Sub-agent N"]
    SA1 --> Merge["Result Aggregation"]
    SA2 --> Merge
    SA3 --> Merge

Fork multiple sub-agents through AgentTool, with each sub-agent independently processing its subtask. The parent agent ultimately aggregates the results.

Pattern 5: Safe Planning

flowchart LR
    Plan["EnterPlanModeTool"] --> ReadOnly["Read-only Tool Set"] --> Exec["ExitPlanModeV2Tool"] --> Execute["Execution Tool Set"]

First enter plan mode for safety analysis, then exit plan mode to begin execution after planning is complete.

Pattern 6: External Integration

flowchart LR
    MCP["MCP Connection Initialization"] --> List["ListMcpResourcesTool"] --> Read["ReadMcpResourceTool"] --> Local["Local Tool Processing"]

Access external resources through MCP tools, combined with local tools for processing.


Tool Performance Characteristics Overview

Understanding the performance characteristics of tools helps in making reasonable choices during use:

Tool CategoryTypical LatencyToken ConsumptionParallelismNotes
File ReadLow (local I/O)Medium (depends on file size)High (all concurrency-safe)Large file output is truncated
File WriteLow (local I/O)LowNo parallelismRecommended to read and confirm before writing
File EditLow (local I/O)LowNo parallelismRequires exact match of original string
Search (Glob/Grep)Low (local operation)Medium (depends on result volume)High (all concurrency-safe)Result limits prevent token overflow
Bash ExecutionVariable (depends on command)Variable (depends on output)Read-only commands can run in parallelLong-running commands have timeout mechanism
Network OperationsHigh (network latency)Medium (depends on page content)High (all concurrency-safe)Significantly affected by network conditions
Sub-agentHigh (recursive API calls)High (independent context)High (independent execution)Note nesting depth limits
MCP OperationsMedium (inter-process communication)Medium (depends on resource size)Depends on MCP serverConnection state affects availability