Claude Code: Tools Reference

🇬🇧 English claude-codetoolsreferenceenglish
📋 Table of Contents (14 sections)
  1. Tools Reference
  2. Overview
  3. File System Tools
  4. Shell & Execution Tools
  5. Agent & Orchestration Tools
  6. Task Management Tools
  7. Web Tools
  8. MCP (Model Context Protocol) Tools
  9. Integration Tools
  10. Scheduling & Triggers
  11. Utility Tools
  12. Permission Model
  13. Tool Presets
  14. See Also

Tools Reference

Complete catalog of all ~40 agent tools in Claude Code.


Overview

Every tool lives in src/tools/<ToolName>/ as a self-contained module. Each tool defines:

  • Input schema — Zod-validated parameters
  • Permission model — What requires user approval
  • Execution logic — The tool’s implementation
  • UI components — Terminal rendering for invocation and results
  • Concurrency safety — Whether it can run in parallel

Tools are registered in src/tools.ts and invoked by the Query Engine during LLM tool-call loops.

Tool Definition Pattern

export const MyTool = buildTool({
  name: 'MyTool',
  aliases: ['my_tool'],
  description: 'What this tool does',
  inputSchema: z.object({
    param: z.string(),
  }),
  async call(args, context, canUseTool, parentMessage, onProgress) {
    // Execute and return { data: result, newMessages?: [...] }
  },
  async checkPermissions(input, context) { /* Permission checks */ },
  isConcurrencySafe(input) { /* Can run in parallel? */ },
  isReadOnly(input) { /* Non-destructive? */ },
  prompt(options) { /* System prompt injection */ },
  renderToolUseMessage(input, options) { /* UI for invocation */ },
  renderToolResultMessage(content, progressMessages, options) { /* UI for result */ },
})

Directory structure per tool:

src/tools/MyTool/
├── MyTool.ts        # Main implementation
├── UI.tsx           # Terminal rendering
├── prompt.ts        # System prompt contribution
└── utils.ts         # Tool-specific helpers

File System Tools

ToolDescriptionRead-Only
FileReadToolRead file contents (text, images, PDFs, notebooks). Supports line rangesYes
FileWriteToolCreate or overwrite filesNo
FileEditToolPartial file modification via string replacementNo
GlobToolFind files matching glob patterns (e.g. **/*.ts)Yes
GrepToolContent search using ripgrep (regex-capable)Yes
NotebookEditToolEdit Jupyter notebook cellsNo
TodoWriteToolWrite to a structured todo/task fileNo

Shell & Execution Tools

ToolDescriptionRead-Only
BashToolExecute shell commands in bashNo
PowerShellToolExecute PowerShell commands (Windows)No
REPLToolRun code in a REPL session (Python, Node, etc.)No

Agent & Orchestration Tools

ToolDescriptionRead-Only
AgentToolSpawn a sub-agent for complex tasksNo
SendMessageToolSend messages between agentsNo
TeamCreateToolCreate a team of parallel agentsNo
TeamDeleteToolRemove a team agentNo
EnterPlanModeToolSwitch to planning mode (no execution)No
ExitPlanModeToolExit planning mode, resume executionNo
EnterWorktreeToolIsolate work in a git worktreeNo
ExitWorktreeToolExit worktree isolationNo
SleepToolPause execution (proactive mode)Yes
SyntheticOutputToolGenerate structured outputYes

Task Management Tools

ToolDescriptionRead-Only
TaskCreateToolCreate a new background taskNo
TaskUpdateToolUpdate a task’s status or detailsNo
TaskGetToolGet details of a specific taskYes
TaskListToolList all tasksYes
TaskOutputToolGet output from a completed taskYes
TaskStopToolStop a running taskNo

Web Tools

ToolDescriptionRead-Only
WebFetchToolFetch content from a URLYes
WebSearchToolSearch the webYes

MCP (Model Context Protocol) Tools

ToolDescriptionRead-Only
MCPToolInvoke tools on connected MCP serversVaries
ListMcpResourcesToolList resources exposed by MCP serversYes
ReadMcpResourceToolRead a specific MCP resourceYes
McpAuthToolHandle MCP server authenticationNo
ToolSearchToolDiscover deferred/dynamic tools from MCP serversYes

Integration Tools

ToolDescriptionRead-Only
LSPToolLanguage Server Protocol operations (go-to-definition, find references, etc.)Yes
SkillToolExecute a registered skillVaries

Scheduling & Triggers

ToolDescriptionRead-Only
ScheduleCronToolCreate a scheduled cron triggerNo
RemoteTriggerToolFire a remote triggerNo

Utility Tools

ToolDescriptionRead-Only
AskUserQuestionToolPrompt the user for input during executionYes
BriefToolGenerate a brief/summaryYes
ConfigToolRead or modify Claude Code configurationNo

Permission Model

Every tool invocation passes through the permission system (src/hooks/toolPermission/). Permission modes:

ModeBehavior
defaultPrompt the user for each potentially destructive operation
planShow the full plan, ask once
bypassPermissionsAuto-approve everything (dangerous)
autoML-based classifier decides

Permission rules use wildcard patterns:

Bash(git *)           # Allow all git commands
FileEdit(/src/*)      # Allow edits to anything in src/
FileRead(*)           # Allow reading any file

Each tool implements checkPermissions() returning { granted: boolean, reason?, prompt? }.


Tool Presets

Tools are grouped into presets in src/tools.ts for different contexts (e.g. read-only tools for code review, full toolset for development).


See Also

← Back to claudecodeanalysis