Tools¶
The agent exposes the following tools to the model. Each is offered only when it
can run in the current environment (for example find and grep require
ripgrep on PATH).
| Tool | Purpose |
|---|---|
read |
Read the contents of a file, with optional line offset and limit |
write |
Write content to a file, creating it (and parent directories) as needed |
edit |
Edit a file by exact-text replacement, one or more targeted replacements at a time |
bash |
Execute a bash command in the current directory, with an optional timeout |
list_dir |
List the entries of a directory, one per line |
webfetch |
Fetch a URL over HTTP(S) and return its content as markdown, text, or HTML |
grep |
Search file contents for a pattern via ripgrep |
find |
Find files by glob pattern via ripgrep |
recall |
Retrieve the full original content of a compacted or earlier session item by its recall id |
Beyond the built-ins:
- Defining your own tools covers writing a tool in Lua and offering it to the model.
- Bridging an MCP server covers exposing an entire Model Context Protocol server's tools at once.
- The
tool_callhook covers intercepting a call before it runs, to rewrite its arguments or reject it outright. - Reducing token usage with rtk is a worked example of the
tool_callhook that routesbashcommands through rtk.