Bundled Tools

August 6, 2026 · View on GitHub

The agent includes a core local tool suite and agent-level helpers. The LLM automatically selects and invokes them based on the task. MCP servers can add more tools at runtime.

ToolFunctionConcurrent
ReadRead file contents (with line numbers)Yes
WriteWrite files (auto-creates directories)No
EditPrecise string replacementNo
ExecCommandExecute shell commandsNo
GrepRegex search file contents (via ripgrep)Yes
GlobFind files by pattern matchingYes
ViewImageLoad a local JPEG, PNG, GIF, or WebP image for model inspectionYes
SpawnSpawn sub-agents for parallel tasksNo
ToolSearchLoad schemas for deferred toolsYes

Read

Read file contents with line numbers, similar to cat -n.

  • Supports offset and limit parameters for reading file slices
  • Auto-detects binary files
  • Output format: line-numbered text

Write

Write content to a file atomically.

  • Atomic write: writes to a temp file first, then renames
  • Auto-creates parent directories

Edit

Find and replace exact strings in a file.

  • Matches old_string exactly and replaces with new_string
  • Requires a unique match by default; errors on multiple matches
  • Use replace_all to replace all occurrences

ExecCommand

Execute a shell command and return the result.

  • Default timeout: 120 seconds, max 600 seconds
  • Returns exit code, stdout, and stderr

Grep

Search file contents with regular expressions.

  • Uses rg (ripgrep) when available, falls back to grep -rn
  • Supports glob filtering and case-insensitive search
  • Results limited to 250 lines

Glob

Find files matching a glob pattern.

  • Standard glob patterns (e.g., **/*.rs)
  • Results sorted by modification time (newest first)
  • Returns up to 100 files

ViewImage

Load a supported local image and attach it to the next model turn.

  • Accepts an absolute file path
  • Supports JPEG, PNG, GIF, and WebP files up to 20 MB
  • Validates that the file content matches its extension

Spawn

See Sub-Agent Spawning in the Advanced Features guide.

ToolSearch

Load full schemas for deferred tools so the LLM can invoke them. Deferred bundled or MCP tools are registered without their full parameter schemas until the LLM calls ToolSearch.

  • Search by tool name or a keyword from its description
  • Returns the full schemas of all matching deferred tools

Skills are exposed through the Skill tool. When plan mode is enabled, EnterPlanMode and ExitPlanMode are also registered. See Skills and Plan Mode for details.


How It Works

User input → Build request (system prompt + history + tool definitions)
           → Stream LLM API response
           → Output text to stdout in real-time
           → If LLM returns tool_use → confirm → execute → send result back
           → Loop until LLM stops calling tools
           → Output final reply → save session
  • Concurrent-safe tools (Read, Grep, Glob, ViewImage) execute in parallel
  • Non-concurrent tools (Write, Edit, ExecCommand) execute sequentially
  • Tool output is auto-truncated to prevent context window overflow
  • Tool output can be compacted (see Output Compaction)

Tool Descriptions

Each built-in tool includes a detailed description and usage guidance that is injected into the system prompt. These descriptions help the LLM select the right tool and use it effectively — for example, preferring Grep over ExecCommand for content search, or using Edit instead of Write for modifications.