Tools are the capabilities Claude uses to interact with your filesystem, shell, browser, and external services. Claude selects tools automatically based on the task; you do not invoke them directly. You can control which tools Claude is permitted to use viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/VineeTagarwal-code/claude-code/llms.txt
Use this file to discover all available pages before exploring further.
/permissions or by editing settings.json.
File & Filesystem Tools
Read — Read files and directories
Read — Read files and directories
ReadReads a file from the local filesystem. Claude can read any file accessible to the process, including text files, images (PNG, JPG, and other formats), PDFs, and Jupyter notebooks (.ipynb).Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | Yes | Absolute path to the file to read |
offset | number | No | Line number to start reading from (1-indexed) |
limit | number | No | Maximum number of lines to read (default: 2000) |
- File paths must be absolute, not relative.
- Returns up to 2000 lines by default, with line numbers prefixed (
cat -nformat). - For large files, Claude can call the tool multiple times with
offsetto read in sections. - For image files, the content is returned as a visual attachment (Claude Code is multimodal).
- For PDF files, up to 20 pages per request; large PDFs require the
pagesparameter (e.g.,"1-5"). - For Jupyter notebooks, returns all cells with their outputs.
- If the file has not changed since the last read in this session, Claude receives a notice to reuse the cached content.
Write — Write files
Write — Write files
WriteWrites content to a file, creating it if it does not exist or overwriting it entirely if it does.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | Yes | Absolute path to the file to write |
content | string | Yes | The full content to write to the file |
- Always writes the complete file content — there is no partial-write mode.
- When overwriting an existing file, produces a diff patch for display.
- Notifies connected IDE extensions (VS Code) about the change.
- Tracks file history for undo support when file history is enabled.
- Automatically creates parent directories if they do not exist.
Edit — Edit files with exact string replacement
Edit — Edit files with exact string replacement
EditPerforms an exact string replacement in a file. This is the preferred tool for modifying existing files because it only changes the specific text you target, leaving the rest of the file untouched.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | Yes | Absolute path to the file to modify |
old_string | string | Yes | The exact text to replace (must be unique in the file unless replace_all is true) |
new_string | string | Yes | The replacement text |
replace_all | boolean | No | Replace all occurrences of old_string (default: false) |
- The edit fails if
old_stringis not found in the file. - The edit fails if
old_stringmatches multiple locations andreplace_allisfalse. - Produces a structured diff patch for review and display.
- Notifies connected IDE extensions about the change.
- Tracks file history for undo support.
Write.Glob — Find files by name pattern
Glob — Find files by name pattern
GlobFinds files matching a glob pattern within a directory. Returns matching file paths sorted by modification time (most recently modified first).Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
pattern | string | Yes | The glob pattern to match (e.g., **/*.ts, src/**/*.test.js) |
path | string | No | Directory to search in. Defaults to the current working directory |
- Results are sorted by modification time, most recent first.
- Returns up to 100 matching file paths; results are truncated beyond that.
- Ignores directories and returns only file paths.
- Version control directories (
.git,.svn, etc.) are automatically excluded.
Grep — Search file contents with regex
Grep — Search file contents with regex
GrepSearches file contents using regular expressions via ripgrep (rg). Supports multiple output modes, context lines, case-insensitive search, file type filtering, and pagination.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
pattern | string | Yes | Regular expression to search for |
path | string | No | File or directory to search (defaults to current working directory) |
glob | string | No | Glob pattern to filter files (e.g., *.ts, *.{js,jsx}) |
output_mode | string | No | "content" (matching lines), "files_with_matches" (file paths only), or "count" (match counts). Defaults to "files_with_matches" |
-B | number | No | Lines of context before each match (requires output_mode: "content") |
-A | number | No | Lines of context after each match (requires output_mode: "content") |
-C / context | number | No | Lines of context before and after each match |
-n | boolean | No | Show line numbers (requires output_mode: "content", defaults to true) |
-i | boolean | No | Case-insensitive search |
type | string | No | File type filter (e.g., js, py, rust, go) |
head_limit | number | No | Limit output to first N lines/entries (default: 250; pass 0 for unlimited) |
offset | number | No | Skip first N lines/entries before applying head_limit |
multiline | boolean | No | Enable multiline mode (. matches newlines) |
NotebookEdit — Edit Jupyter notebook cells
NotebookEdit — Edit Jupyter notebook cells
NotebookEditEdits cells in a Jupyter notebook (.ipynb) file. Supports replacing, inserting, and deleting cells.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
notebook_path | string | Yes | Absolute path to the .ipynb file |
cell_id | string | No | ID of the cell to edit. For inserts, the new cell is placed after this cell (or at the beginning if omitted) |
new_source | string | Yes | New source content for the cell |
cell_type | string | No | "code" or "markdown". Defaults to the current cell type. Required when edit_mode is "insert" |
edit_mode | string | No | "replace" (default), "insert", or "delete" |
- Works only with
.ipynbfiles; useEditfor plain Python or Markdown files. - Cell outputs are not modified — only the source is changed.
- The notebook is re-serialized as JSON after the edit.
- Tracks file history for undo support.
Shell Tools
Bash — Run shell commands
Bash — Run shell commands
BashExecutes shell commands. This is the most powerful and versatile tool; it can run any shell command the user has granted permission for.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
command | string | Yes | The shell command to execute |
timeout | number | No | Timeout in milliseconds |
description | string | No | Short human-readable description of what the command does (5–10 words for simple commands) |
run_in_background | boolean | No | Run the command as a background task. Claude will receive a notification when it completes |
- Commands run in a persistent shell session with the current working directory.
- Long-running commands (over 2 seconds) show a progress indicator and can be backgrounded with Ctrl+B.
- In assistant mode, commands that run longer than 15 seconds are automatically moved to the background.
- Output larger than 30,000 characters is persisted to a file in the tool-results directory and summarized inline; Claude can read the full output via
Read. - Image output (e.g., from plotting libraries) is returned as a visual attachment.
sedin-place edits (sed -i) are intercepted and shown as file edit previews rather than run directly.
run_in_background is true, Claude receives the task ID and output file path immediately, then gets notified via a task notification when the command finishes.Sandboxing: On supported platforms, commands can run inside a sandbox. The sandbox can be bypassed with dangerouslyDisableSandbox: true (requires explicit user permission).Permission behavior: Requires explicit permission for each command pattern. Use /permissions to configure allow/deny rules such as Bash(git *) or Bash(npm run *).AI Agent Tools
Task (Agent) — Launch sub-agents
Task (Agent) — Launch sub-agents
TaskLaunches a specialized sub-agent to perform a task. Agents run the full Claude Code loop with their own tool access, enabling parallel work and delegation of complex subtasks.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
description | string | Yes | Short (3–5 word) description of the task |
prompt | string | Yes | The full task description for the agent |
subagent_type | string | No | Type of specialized agent to use (e.g., a named agent from your ~/.claude/agents/ directory) |
model | string | No | Model override: "sonnet", "opus", or "haiku". Overrides the agent definition’s model |
run_in_background | boolean | No | Run the agent in the background. Claude receives a notification when it completes |
isolation | string | No | "worktree" to run the agent in a temporary git worktree (isolated copy of the repo) |
cwd | string | No | Absolute path for the agent’s working directory. Mutually exclusive with isolation: "worktree" |
- Sub-agents have their own tool set and permission context, scoped to their task.
- The parent Claude waits for the agent to complete (or proceeds if
run_in_backgroundistrue). - Agent output is returned as a structured result to the parent.
- Using
isolation: "worktree"creates a temporary git worktree so the agent works on an isolated copy; the worktree is cleaned up when the agent exits.
general-purpose, explore, plan, verification, statusline-setup) that are automatically selected when appropriate.Permission behavior: Agent tool access is subject to the same permission rules as the parent session.TodoWrite — Manage the session task list
TodoWrite — Manage the session task list
TodoWriteCreates and updates a structured task list for the current session. Claude uses this tool proactively to track progress on multi-step tasks.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
todos | array | Yes | The complete updated todo list |
content— Imperative description of the task (e.g.,"Run tests")activeForm— Present continuous form shown in the spinner (e.g.,"Running tests")status—"pending","in_progress", or"completed"
- Claude should have exactly one task
in_progressat any time. - When all tasks are
completed, the list is cleared. - The task list is visible in the Claude Code UI and updates in real time.
- Claude uses this tool for tasks with 3 or more distinct steps, and skips it for trivial single-step requests.
Background Task Tools
These tools manage long-running background tasks launched viaBash(..., run_in_background: true) or Task(..., run_in_background: true).
TaskCreate — Create a tracked task
TaskCreate — Create a tracked task
TaskCreateCreates a new task in the session task list (TodoV2 format, when enabled).Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
subject | string | Yes | Brief title for the task |
description | string | Yes | What needs to be done |
activeForm | string | No | Present continuous form shown in spinner (e.g., "Running tests") |
metadata | object | No | Arbitrary metadata to attach |
id and subject.TaskGet — Retrieve a task by ID
TaskGet — Retrieve a task by ID
TaskGetRetrieves details about a specific task by its ID.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | The ID of the task to retrieve |
id, subject, description, status, blocks, and blockedBy arrays.TaskList — List all tasks
TaskList — List all tasks
TaskListLists all tasks in the current session task list.TaskUpdate — Update a task
TaskUpdate — Update a task
TaskUpdateUpdates the status or content of an existing task.TaskStop — Stop a background task
TaskStop — Stop a background task
TaskStopStops a running background task.Web Tools
WebFetch — Fetch content from a URL
WebFetch — Fetch content from a URL
WebFetchFetches content from a URL and applies a prompt to extract relevant information from the fetched page.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL to fetch (must be a valid URL) |
prompt | string | Yes | The question or instruction to apply to the fetched content |
- Fetches the URL and converts the response to Markdown.
- Applies the
promptto the Markdown content to extract the relevant parts. - Returns the processed result, HTTP response code, response size in bytes, and duration.
- Maximum content size is 100,000 characters before truncation.
- Some hosts are pre-approved and do not require a permission prompt.
WebFetch(domain:example.com) permission rules.WebSearch — Search the web
WebSearch — Search the web
WebSearchSearches the web using Anthropic’s built-in search capability and returns synthesized results.Input parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The search query (minimum 2 characters) |
allowed_domains | string[] | No | Only include results from these domains |
blocked_domains | string[] | No | Exclude results from these domains |
allowed_domains and blocked_domains cannot be specified in the same request.- Uses Anthropic’s native web search beta (
web_search_20250305). - Performs up to 8 searches per tool call.
- Returns a synthesized response with source URLs as Markdown links.
- Available for first-party API users, Vertex AI users (Claude 4.0+ models), and Foundry users.
MCP Tools
MCP tools — Tools from Model Context Protocol servers
MCP tools — Tools from Model Context Protocol servers
mcp__<servername>__<toolname>MCP (Model Context Protocol) tools are provided by external MCP servers you configure. Each MCP server can expose any number of tools with custom names, schemas, and capabilities.Behavior:- MCP tools appear in Claude’s tool list with the prefix
mcp__<servername>__<toolname>. - Input schemas are defined by the MCP server and vary per tool.
- Claude cannot use an MCP tool it has not been granted permission for.
- MCP servers connect over stdio, HTTP (SSE), or WebSocket transports.
/mcp to enable, disable, and inspect connected servers.Permission behavior: Each MCP tool requires its own permission rule. Claude asks for permission the first time it tries to call a new MCP tool.