pub struct ToolsConfig {Show 28 fields
pub workspace_root: Option<PathBuf>,
pub read_file: Policy,
pub search_files: Policy,
pub write_file: Policy,
pub rewrite_guard_bytes: usize,
pub patch: Policy,
pub memory: Policy,
pub shell: Policy,
pub fetch: Policy,
pub script: Policy,
pub execute_code: Policy,
pub delegate: Policy,
pub shell_ask: ShellAsk,
pub shell_timeout_secs: u64,
pub shell_allowlist: Vec<String>,
pub shell_isolate: ShellIsolate,
pub shell_isolate_writable: Vec<PathBuf>,
pub shell_isolate_hide: Vec<PathBuf>,
pub shell_isolate_network: bool,
pub fetch_timeout_secs: u64,
pub fetch_html: FetchHtml,
pub max_output_bytes: usize,
pub concurrency: usize,
pub disabled: Vec<String>,
pub deferred: Vec<String>,
pub tool_search: Policy,
pub tool_describe: Policy,
pub tool_call: Policy,
}Fields§
§workspace_root: Option<PathBuf>File tools are confined to this directory. Defaults to the current directory.
read_file: Policy§search_files: PolicyThe search_files tool: a read-only walk of the workspace. allow for the same reason as
read_file — the tree it walks is confined, and a prompt per search is the noise that
teaches people to approve without reading.
write_file: Policy§rewrite_guard_bytes: usizeAbove this many bytes, clobbering an existing file with write_file needs force.
A rewrite carries the whole file as a tool-call argument, and that argument stays in the
conversation for the rest of the session — the single most expensive way to change a line.
0 switches the guard off.
patch: PolicyThe patch tool: a targeted edit of a file that already exists. Same default as
write_file, because it is the same side effect, more carefully aimed.
memory: PolicyThe memory tool: write a durable fact to MEMORY.md, which is loaded into every later
system prompt of the session. ask by default: clean writes still run silently, and only
writes carrying a verbatim run from a tool result in the same turn prompt (#482).
allow skips the taint check; deny disables the tool.
shell: Policy§fetch: Policy§script: PolicyThe script tool, which runs a file from the scripts directory. ask by default: a
script is arbitrary code, and one the agent wrote itself is no more trustworthy for it.
A bare {"list": true} is a read of a directory the user owns and is not asked about.
execute_code: PolicyThe execute_code tool: a short program written for one job, run from a temporary file
that is deleted afterwards, with a bridge back to the registry so the program can call
tools. ask by default: it is arbitrary code, and a bridge makes it more useful, not
more trustworthy.
delegate: PolicyThe delegate tool, which hands a job to a child agent. ask by default: a child
spends tokens, possibly on a bigger model than the one you are talking to, and may run
tools of its own.
shell_ask: ShellAskTimeout for shell and for script: they are the same kind of thing, a process the
agent started, and one number keeps them honest with each other.
Whether the shell asks about every command or only about the dangerous ones.
shell_timeout_secs: u64§shell_allowlist: Vec<String>If non-empty, shell only runs these program names, without a shell.
shell_isolate: ShellIsolateWhat a shell command can reach: off (a plain process), process (a private PID
namespace, filesystem unchanged) or fs (also a read-only filesystem). process by
default. Any mode but off needs bubblewrap, and refuses to run without it rather
than quietly running unsandboxed.
shell_isolate_writable: Vec<PathBuf>Paths bound read-write in fs mode, beyond the workspace and the scripts directory.
~ is the home directory. A cargo build needs ~/.cargo here.
shell_isolate_hide: Vec<PathBuf>Paths replaced by an empty directory in fs mode, so their contents cannot be read.
~ is the home directory.
shell_isolate_network: boolWhether fs mode keeps the network. true by default: a build needs it, and a task
that only edits files can turn it off.
fetch_timeout_secs: u64§fetch_html: FetchHtmltext (default) converts HTML responses to plain text; raw returns the source.
The model can override per call with {"raw": true|false}.
max_output_bytes: usizeTool output is truncated to this many bytes before reaching the model.
concurrency: usizeHow many of one turn’s tool calls may run at the same time. 1 (the default) runs them one after another; 0 is treated as 1. Results are committed in the order the model emitted the calls, whatever this is set to.
disabled: Vec<String>Tools to remove entirely, whatever their policy says. Not offered to the model, and a
call that names one is refused — the point is that a hallucinated call cannot slip
through. Stronger than deny: it also survives a plugin claiming the name.
deferred: Vec<String>Tools that stay registered and callable but are not described in the request, so they
cost no tokens until they are needed. tool_search finds them by keyword,
tool_describe gives their arguments, and tool_call runs them — all three through the
same policy, approval and hook path as a direct call, so deferring a tool moves it out of
the prompt and changes nothing else. "*" defers everything registered, and a trailing
* is a prefix. A pattern is matched against a tool’s name and against its source
(plugin:mcp:<server>), because MCP tools keep the names their server published and so
cannot be deferred by name (#351).
The shipped default is plugin:mcp:*: an MCP server is where forty tools come from, and
forty schemas in every request is four thousand tokens of promise. Plugins that declare a
handful of tools stay visible; anything can be deferred or un-deferred explicitly.
tool_search: PolicyThe three tools that reach the deferred ones. allow by default: none of them has a
side effect of its own, and tool_call is a router — the tool it routes to is what
the policy and the approval prompt are about, so asking twice would only train the user
to hold down Enter.
tool_describe: Policy§tool_call: Policy