# Agent tools

> The ten tools an agent can call, what each one does, its limits, and how the tool policy treats it.

Agents work through ten tools. Every call is checked by the [tool policy](https://raptorcode.dev/docs/security#tool-policy) before it runs, and any other tool name is denied.

| Tool | What it does | Policy |
|---|---|---|
| `read_file` | Reads a file; with `offset` and `limit`, returns numbered line ranges of large files | Allowed (reads are not limited to the workspace) |
| `edit_file` | Replaces an exact, unique string, or every occurrence, so edits never rewrite whole files | Write boundary |
| `write_file` | Creates a file or replaces its whole content | Write boundary |
| `search_files` | Regex search across the project, honouring `.gitignore` and skipping binaries | Allowed |
| `find_files` | Finds files by glob, such as `*.rs` or `src/**/*.ts` | Allowed |
| `update_plan` | Keeps a checklist that the REPL and the swarm dashboard show as progress | Allowed |
| `list_directory` | Lists a directory | Allowed |
| `create_directory` | Creates a directory | Write boundary |
| `change_directory` | Changes the agent's working directory | Allowed |
| `run_command` | Runs build, test, lint and git commands | Shell policy |

## `run_command`

- Runs the command through `sh -c` (`cmd /C` on Windows) after the shell policy has read it.
- Closes stdin, so a command that prompts fails at once instead of waiting.
- Stops a command after **120 seconds** by default. A call may ask for up to **900** with `timeout_secs`. On timeout, it stops the whole process group (Unix) or process tree (Windows) and returns the output so far.
- Returns at most **30 KB** of output, keeping the start and the end, and ends the output of a failed command with `[exit code N]`.
- Returns 2 seconds after the shell exits even when a background process keeps its output open, with a note saying so.

## `read_file`

Reads regular UTF-8 files only and returns at most about **200 KB** per call. Use `offset` and `limit` to page through larger files.

## Working the way a developer would

The agent is prompted to verify its work: build, run the tests, read the exit code, fix and run again before it reports. It reads the first of `RAPTOR.md`, `AGENTS.md` or `CLAUDE.md` in the repository as project instructions, which is the best place to tell it how to build and test your project.

> **Info:** The agent's tools are the same in the REPL, in every swarm agent and in `raptor run`. What differs is who answers confirmations: you, the dashboard, or `--yes`.
