Tools

Built-in tools are organized by category. Every tool runs with a timeout and captured output. On Unix, a timed-out or cancelled command's whole process group is killed so nothing is orphaned.

File system (deterministic)

ToolDescription
file_readRead file contents (line-numbered; paged with offset/limit)
file_writeCreate or overwrite a whole file
file_editReplace a unique, exact occurrence of text in a file
list_directoryList directory contents

Code operations (deterministic)

ToolDescription
cargo_checkRun cargo check
cargo_clippyRun cargo clippy (optional fix)
cargo_fmtFormat code with cargo fmt (optional check)
cargo_testRun tests (optional filter)
cargo_addAdd dependencies (optional features, dev)

Search (deterministic)

ToolDescription
searchCode search via ripgrep

Git (deterministic)

ToolDescription
git_statusCheck git status
git_diffShow changes (unstaged or staged)
git_commitCommit changes (optional all; never pushes)
git_branchList, create, or switch branches

Command execution (semi-deterministic)

ToolDescription
execute_commandRun shell commands with the agent's privileges

Enabled by default; disable with allow_execute_command = false.

Output handling

Every command-based tool keeps its output lean:

  • The tail of the output is kept in the result.
  • When output is truncated, the full output is written to a temp file and its path is included in the result.
  • No interactive stdin.
  • Non-zero exits (compiler, linter, or test failures) come back as output, not errors, so the agent can read them and iterate rather than crashing the run.

How the LLM uses them

The LLM never hand-rolls what a tool can do. It uses the tools for the mechanical work and spends its budget on planning, interpretation, and complex changes. See Determinism First.

Permission policy

Before every tool call the agent consults a policy. Two composable controls gate which tools may run. See Security for the full policy model, read-only mode, and the command denylist.