All 45+ Tools / File & Code

File & Code Tools

FileReadTool

Location: src/tools/FileReadTool/

Reads file contents with support for: plain text files (with line numbers), PDF documents (page-by-page extraction), Jupyter notebooks (.ipynb with cell outputs), images (PNG, JPG - visual display for multimodal LLM), binary detection and rejection. Supports line limiting (offset + limit) for large files, and compresses images to reduce token usage.

Parameters:

NameTypeRequiredDescription
file_pathstringYesAbsolute path to the file
offsetnumberNoLine number to start reading from
limitnumberNoNumber of lines to read (default: 2000)
pagesstringNoPDF page range (e.g., "1-5")

FileEditTool

Location: src/tools/FileEditTool/ (8 files)

Performs exact string replacements in files. Uses old_string/new_string matching (must be unique in file). Supports replace_all for global renaming. Shows diff preview before applying. Requires file to be read first (via FileReadTool) to prevent blind edits.

Parameters:

NameTypeRequiredDescription
file_pathstringYesAbsolute path to the file to modify
old_stringstringYesThe text to replace (must be unique)
new_stringstringYesThe replacement text
replace_allbooleanNoReplace all occurrences (default: false)

FileWriteTool

Location: src/tools/FileWriteTool/ (5 files)

Creates or overwrites files atomically. Checks permissions before writing. Validates parent directory exists. Will not create files without reading the existing file first (if it exists).

GlobTool

Location: src/tools/GlobTool/ (5 files)

Fast file pattern matching using glob syntax. Returns matching file paths sorted by modification time. Works with any codebase size.

GrepTool

Location: src/tools/GrepTool/ (5 files)

Powered by ripgrep. Full regex support. Output modes: content (with context lines), files_with_matches, count. Supports file type and glob filtering.

LSPTool

Location: src/tools/LSPTool/ (8 files)

Language Server Protocol integration providing IDE features: go-to-definition, hover info, symbol search, completion, diagnostics.

💡Try This Experiment

Go to the Tool Simulator in the Playground. Select FileReadTool and enter a file path. Watch how it validates the path and returns line-numbered content.

Open Tool Simulator →
All 45+ Tools / Execution

Execution Tools

BashTool

Location: src/tools/BashTool/ (18 files, 160KB main)

The most complex tool in Claude Code. Executes shell commands with real-time streaming output, environment variable control, timeout management, background execution mode, and a massive 98KB security validation module.

Security Sub-Modules:

bashSecurity.ts (98KB) - Main command validation engine
pathValidation.ts (43KB) - Path access control
readOnlyValidation.ts (68KB) - Read-only mode enforcement
sedValidation.ts - Sed script safety analysis
destructiveCommandWarning.ts - Warns before dangerous ops
shouldUseSandbox.ts - Sandbox decision logic
commandSemantics.ts - Command intent analysis

PowerShellTool

src/tools/PowerShellTool/ (16 files)

Windows-specific shell execution. Loaded conditionally only on Windows systems.

NotebookEditTool

src/tools/NotebookEditTool/ (6 files)

Jupyter notebook cell operations: create, edit, delete, move cells, change cell type. Preserves notebook metadata and outputs.

💡Try This Experiment

Go to the Security Command Tester. Type 'rm -rf /' and see how bashSecurity.ts catches it. Then try 'ls -la' and see it pass. Can you find a command that looks safe but gets blocked?

Open Security Tester →
All 45+ Tools / Agents

Agent & Team Tools

AgentTool

src/tools/AgentTool/ (20+ files)

Spawns independent sub-agents with their own conversation context. Supports 5 built-in agent types with foreground/background execution and worktree isolation.

Built-in Agent Types:

AgentPurposeTools
general-purposeComplex multi-step tasksAll tools
ExploreFast codebase searchRead-only (no Edit/Write)
PlanArchitecture designRead-only + planning
claude-code-guideHelp & documentationGlob, Grep, Read, WebFetch
verificationTest runningBuild + test tools

TeamCreateTool / TeamDeleteTool / SendMessageTool

Coordinator Mode Only (Feature Flag: COORDINATOR_MODE)

Internal-only tools for multi-agent team orchestration. Not available in normal mode.

💡Try This Experiment

Think about how you'd parallelize searching a large codebase. You'd spawn 3 Explore agents for different directories - each runs independently. This is exactly what AgentTool does.

Open Tool Simulator →
All 45+ Tools / Web & Search

Web & Search Tools

WebSearchTool

Web search via Claude's native web_search tool.

WebFetchTool

HTTP fetch with automatic HTML-to-Markdown conversion.

ToolSearchTool

Discovers available tools dynamically via deferred loading.

ListMcpResourcesTool / ReadMcpResourceTool

MCP resource discovery and reading from connected servers.

All 45+ Tools / Tasks

Task & Schedule Tools

TaskCreateTool

Creates structured task entries with status tracking.

TaskUpdateTool

Updates task status, dependencies, and metadata.

TaskGetTool / TaskListTool / TaskStopTool / TaskOutputTool

Complete task lifecycle management.

CronCreateTool / CronDeleteTool / CronListTool

Feature Flag: AGENT_TRIGGERS

Cron job management for scheduled recurring tasks.

RemoteTriggerTool

Feature Flag: AGENT_TRIGGERS_REMOTE

Schedules remote async agent execution on Anthropic's infrastructure.

💡Try This Experiment

In the Playground Token Calculator, set 100 messages and check the budget. Now imagine each TaskCreate adds ~50 tokens overhead. How does that affect your budget?

Open Token Calculator →
All 45+ Tools / Control

Control & Mode Tools

EnterPlanModeTool / ExitPlanModeV2Tool

Plan mode enables extended thinking with 30-minute budget for complex architectural decisions.

EnterWorktreeTool / ExitWorktreeTool

Git worktree management for isolated experimentation.

AskUserQuestionTool

Prompts user for input when AI needs clarification.

SkillTool

Executes MCP skills and custom /slash commands.

💡Try This Experiment

Go to the Permission Simulator. Select BashTool:git push --force in Bypass mode. See how it gets auto-approved with NO safety check. Now switch to Default mode - see the difference?

Open Permission Simulator →