Tools are the actions Claude can take during a session. When you ask Claude to do something, it selects and calls the appropriate tools to accomplish the task — reading a file, running a shell command, searching the codebase, or fetching a web page. Each tool call is visible in the terminal as it happens. Depending on your permission settings, Claude may ask for your approval before running certain tools.Documentation 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.
Available tools
Bash
Executes shell commands and returns their output. The working directory persists between commands; shell state does not.
Read
Reads files from the local filesystem, including images, PDFs, and Jupyter notebooks.
Write
Creates new files or completely overwrites existing files on disk.
Edit
Performs exact string replacements in existing files — sends only the diff, not the full file.
Glob
Finds files by glob pattern (e.g.,
**/*.ts), sorted by modification time.Grep
Searches file contents with regular expressions, powered by ripgrep.
WebFetch
Fetches a URL, converts HTML to Markdown, and processes it with a prompt.
WebSearch
Searches the web and returns relevant results.
Agent
Spawns a sub-agent to handle complex, multi-step tasks autonomously.
MCPTool
Calls tools exposed by connected MCP servers.
TodoWrite
Creates and manages a structured task list for the current session.
Tool reference
Bash
Executes a bash command and returns its output. The working directory persists between commands, but shell state (variables, functions) does not — the shell environment is re-initialized from the user’s profile on each call.Long-running commands can be sent to the background with
run_in_background: true. Claude receives a notification when the command completes and can read the output at any time.Read
Reads a file from the local filesystem. Supports text files, images (PNG, JPG, etc.), PDFs, and Jupyter notebooks (.ipynb). Returns content with line numbers prefixed in cat -n format.
Write
Writes content to a file on the local filesystem. Creates the file if it does not exist, or overwrites it entirely if it does.Edit
Performs an exact string replacement in a file. Claude must have read the file at least once in the current conversation before editing it.old_string must exactly match the content as it appears in the file, including whitespace.
Glob
Finds files matching a glob pattern. Returns matching paths sorted by modification time (most recently modified first).find through Bash.
Grep
Searches file contents using regular expressions, powered by ripgrep. Supports several output modes:files_with_matches (default), content, or count.
WebFetch
Fetches a URL, converts the HTML to Markdown, and processes it with a prompt using a fast secondary model. Results are cached for 15 minutes.WebSearch
Searches the web and returns relevant results.Agent
Spawns a sub-agent to handle complex tasks autonomously. The agent runs in a separate context with its own tool budget. See Agents for a full description of agent types and coordination.MCPTool
Calls a tool exposed by a connected MCP server. The tool name, description, and input schema come from the MCP server itself. See MCP Servers for how to configure MCP servers.TodoWrite
Creates and updates a structured task list for the current session. Claude uses this tool proactively for complex, multi-step tasks so you can track progress in real time.in_progress at a time and marks tasks complete immediately after finishing them.
Tool permissions
By default, Claude asks for approval before running tools that modify files or execute commands. You can configure which tools are always allowed, always denied, or require approval on a per-session or per-project basis.See Permissions for the full reference on configuring tool approval rules, including wildcard patterns for Bash commands.
Permission modes
| Mode | Behavior |
|---|---|
| Default | Asks before write operations, destructive commands, and new tool types |
acceptEdits | Auto-approves file edits; still asks for shell commands |
bypassPermissions | Auto-approves everything (use with caution) |
--permission-mode flag, or configure allowedTools and deniedTools in your settings file.