Expand description
Tools the agent can call.
A Tool is a named capability with a JSON-Schema input and an async
execute. The ToolRegistry holds the set offered to a model; built-ins
cover file read/write/edit, directory listing, glob, content search, and
shell execution. Every tool can be disabled or re-described per
crate::Config, so the capability surface is entirely yours to shape.
Structs§
- Apply
Patch Tool - Apply a Codex-style
apply_patchenvelope — Codex’s primary edit mechanism, richer thanedit_file’s single string replace. SupportsAdd File,Delete File, andUpdate File(with-/+/context hunks and an optional*** Move to:rename) in one atomic-ish call. - Bash
Tool - Run a shell command via
sh -c. - Edit
File Tool - Replace an exact substring in a file.
- Glob
Tool - Match files by glob pattern.
- List
DirTool - List directory entries.
- Persistent
Shell Tool - A long-lived shell whose state (working directory, environment variables,
shell functions) persists across calls — unlike the one-shot
BashTool. Also supportswrite_stdinto feed raw input to the shell, for driving interactive programs. This is the analog of Codex’s persistent exec session. - Read
File Tool - Read a UTF-8 text file.
- Search
Tool - Regex search file contents (respecting .gitignore).
- Tool
Context - Ambient context passed to every tool invocation.
- Tool
Registry - An ordered set of tools offered to the model.
- Update
Plan Tool - A simple plan / task tracker. The model calls it to record or update a
checklist of steps (the analog of Codex
update_plan/ Claude’s plan mode). The plan is held in the tool so it persists across calls within a session. - Write
File Tool - Create or overwrite a file.
Enums§
- Sandbox
Policy - Filesystem confinement applied to write-capable tools — the analog of
Codex’s
read-only/workspace-write/danger-full-accesssandbox modes.
Traits§
- Tool
- A callable capability.