Built-in tools
This page lists every built-in tool name the model can call. Use these exact names in agent permission: rules, hook tools: filters, and skill allowed_tools lists.
For how allow / ask / deny are evaluated, including the special coupling between the orchestration tools, see Permissions & Safety.
How to use this page
Section titled “How to use this page”Find the section for the job you are doing:
- Read and edit files: Files, Search and navigation.
- Run commands and long jobs: Execution.
- Fetch a page: Web.
- Plan, ask, and delegate: Workflow, Orchestration and control.
- External tool servers: MCP tools.
While write and edit arguments arrive, their TUI cards show the path once that field is complete. A shell card can show a completed description before the command finishes arriving. The received-character indicator remains until arguments finish or execution begins; final cards use the complete arguments.
| Tool | What it does |
|---|---|
read |
Read a local file into context, with optional 1-based offset / limit line paging. |
write |
Create a file or intentionally replace a whole file. |
edit |
Replace exact text in one existing file. |
apply_patch |
Apply a Codex-style patch envelope (*** Begin Patch): add, update, delete, or move files. Independent file groups may succeed partially; check applied changes before retrying. |
delete |
Remove whole files. |
view_image |
Load a local PNG/JPEG/WebP/GIF/BMP/TIFF image into context, normalized to PNG or JPEG and scaled down to 2000px on the longest edge (animated WebP/GIF/TIFF use their first frame; HEIC/HEIF/AVIF/SVG are rejected); available only when the active model pool’s first model supports image input. Uses the same local-path permission handling as read. |
generate_image |
Generate or edit images with a configured image model pool. Reference images require read permission; an optional output_path requires write permission. See Image generation and editing. |
Only one of edit / apply_patch is exposed to the model at a time, chosen by model family; patch-native models also route file creation/deletion through the apply_patch envelope instead of write/delete. See Edit tools.
Search and navigation
Section titled “Search and navigation”| Tool | What it does |
|---|---|
grep |
Regex/literal content search with output caps; supports multi-root paths, includes glob filters, and optional context_lines (0-20, default 0; larger values are clamped with a note) to also return the lines surrounding each match. Surrounding lines are printed as | path-line-text while matches keep path:line:text; paths with whitespace or ambiguous separators are quoted and escaped; nearby matches share one merged window, and surrounding lines longer than 256 bytes are shortened with .... Context lines count against the output budget but not against the match cap; once the budget has no room for more of them, earlier windows stay whole, the window in flight when the budget runs out may end early, later matches are listed without context, and a footer notes the omission. |
glob |
Path matching by glob pattern(s), with output caps. |
Execution
Section titled “Execution”| Tool | What it does |
|---|---|
shell |
Run commands; long commands can continue as background jobs. See below. |
job_output |
Read new job output, or wait briefly for output or completion. |
job_list |
List the background jobs you can read or stop (id, status, elapsed, quiet duration, label), including jobs started by the main agent and by your direct owner. Only active jobs are listed unless include_finished: true is passed. |
job_kill |
Stop a background job by job_id, with an optional reason. |
Command execution and timeouts
Section titled “Command execution and timeouts”Run a non-interactive shell command, either in the foreground or as a background job with run_in_background: true. A foreground command that runs past yield_time_ms (default 90000) is promoted to a background job automatically; timeout_ms caps execution: a foreground command defaults to 600000 and is capped at 600000, while run_in_background: true is capped at 21600000 (6h) and carries no deadline unless timeout_ms is given; 0 means no deadline.
A foreground command that cannot be promoted (one made only of deliberate waits (sleep) and short git queries, or a command that does not parse) keeps the default cap even when timeout_ms is 0, so no foreground call can block the turn without a deadline; a long git operation (clone, fetch, pull, push, submodule, gc, fsck, repack, bundle, filter-branch) is promotable like any other long command.
Long commands do not have to block the turn. A command that outlives its foreground budget keeps running as a background job, the tool card names its job id, and the agent is notified when the job finishes, so it can do independent work or end the turn and be woken by the completion instead of waiting. A command that exits while the process group it started still runs is handed back the same way even with yield_time_ms: 0, so the turn never waits for those descendants.
A job owns the whole process group its command starts, not only the direct child. A command that exits while children it started keep running stays active until they exit, and those children stay under the job’s timeout_ms deadline, job_kill, and session cleanup, so nohup … & no longer escapes by outliving the wrapper that started it. A process that leaves the group on purpose (setsid, setpgid) is outside the job again — Chord does not scan the process tree for it. A stop signals the group only while a member it recorded when the command exited is still in that group; when that cannot be proven, job_kill reports the teardown as unconfirmed instead of signalling a group number that may have been recycled. Waiting needs no such proof: a job stays active while the group answers at all, so a descendant that inherits the group keeps the job alive even when Chord cannot list its pid. On platforms without process groups (Windows), a job still ends with its direct process: job_kill, the job’s deadline, and session cleanup can only stop that process, and the result reports the teardown as unconfirmed because the descendants it may leave behind cannot be observed.
job_output reads incremental output and only reports what is new, and a bounded wait that expires leaves the job alive. A background job also ends with the session (switching sessions or exiting the client stops it), so day-scale work belongs in an external runner such as tmux, systemd, or CI.
job_list shows the jobs that are running or stopping, with the label, elapsed time, quiet duration, and how much of the deadline is left; pass include_finished: true to also see retained finished ones.
Shell and background output above 16 KiB comes back as a bounded preview with a saved-output reference. Read or search the saved output for details instead of rerunning the command. Avoid piping checks through tail or grep: discarded upstream text never reaches the log, and a pipeline can hide the check’s exit status.
For foreground commands that take several seconds and contain such a pipeline, Chord adds an output-preservation reminder to the result.
Reading background output
Section titled “Reading background output”Read a background job’s output since the previous read, then its [status: ...] line. wait selects whether the call blocks: none (default) returns what is available now, output waits for the next output, and exit waits for the job to finish, each capped at 30s by the runtime. A wait that expires is not an error: the job keeps running and the reply reports it as running, plus a [notice] line that says whether the exit wait timed out or was cancelled and how long the job has been quiet. Repeated non-blocking reads that find no new output are reported as polling and then rejected, so keep reading only while there is a reason to. Terminal escape sequences are stripped from what the model sees.
| Tool | What it does |
|---|---|
web_fetch |
Fetch a URL as readable text; permission rules can match URL patterns. |
web_search |
Search the web through the provider’s hosted search tool; returns a summary with numbered sources. Off by default; enable it with compat.hosted_tools: [web_search] (Configuration & Auth: WebSearch). |
web_search appears only while its routing source has an enabled target that can carry the declaration: without model_pool this is the calling agent’s model pool, and with a named model_pool it is that configured pool. Targets must be Anthropic Messages or OpenAI Responses models with compat.hosted_tools listing it. Each call runs a provider-side search and returns a summary plus numbered sources; optional allowed_domains / blocked_domains filters narrow the results. The same catalog can define further hosted tools through the top-level hosted_tools section (Hosted tools).
With native search in the main request, Anthropic can return a pending search alongside local tool calls. Chord returns the local results to continue that turn, including runtime reminders inside the results. New user input and mailbox messages stay queued until the native turn completes.
Workflow
Section titled “Workflow”| Tool | What it does |
|---|---|
todo_write |
Maintain the visible TODO list for the current task. |
question |
Ask the user a structured question and wait for the answer. ask is normalized to allow for this tool. |
skill |
Load a discovered skill’s content on demand. |
save_artifact |
Save or update a session artifact (report, task graph, log) or store an immutable machine-readable result, under the session’s artifacts directory. |
read_artifact |
Read a session artifact by session-relative path. |
save_artifact takes two mutually exclusive parameter shapes. filename with content (plus mode: create / append / overwrite when needed) writes or updates a session artifact; alternatively, the result_type + result pair (result must be a JSON object) stores the payload as an immutable, content-addressed result under artifacts/results/ and returns a ResultRef (id, result_type, rel_path, sha256, size_bytes), which complete accepts directly as its result_ref.
Orchestration and control
Section titled “Orchestration and control”These tools control agent workflows rather than local side effects, and YOLO does not change what they may do. While the mode is on, their ask rules pass without a confirmation like every other ask, but a deny keeps rejecting — including a scoped deny naming a delegate agent type or a skill, which expresses directory membership — and a wildcard deny default decides exactly as it does with YOLO off. YOLO never grants an orchestration capability the rules do not already allow. See Permissions & Safety: Special permission semantics for how handoff, delegate, cancel, done, and compact_context resolve under YOLO.
| Tool | What it does |
|---|---|
done |
Request loop exit with a final Markdown report. Mounted only while a loop is running, so ordinary sessions never see it. See Usage: continuous execution mode. |
handoff |
Transfer a plan/work to another role for execution. |
delegate |
Start a sub-task and return its handle immediately. The worker’s file and command capabilities come from its role’s permission rules; an optional result_schema declares what the delivered result must contain. |
cancel |
Cancel a delegated worker; requires delegate to be enabled. |
complete |
SubAgent-side: complete the current delegated task with a summary. A non-empty blocked_reason ends it as failed. |
escalate |
SubAgent-side: ask the owner for help (kind: needs_repair) without ending the task, or report a dead end (kind: blocked), which fails it. |
notify |
Send a non-blocking update to the owner or a specific delegated worker. A targeted message resumes a worker that already finished or failed, with its own transcript; a cancelled task is not resumable. See the message forms below. |
Delegation and concurrency
Section titled “Delegation and concurrency”delegate starts a delegated SubAgent workstream and returns its startup handle (task_id / agent_id) immediately, without waiting for completion. The call takes description and agent_type, plus optional plan_task_ref, semantic_task_key, and result_schema; there is no per-task declaration of which files the work may touch.
Whether a worker may modify files or run commands is decided only by its role’s permission rules: a role that denies write, edit, delete, and apply_patch registers none of those tools, and command tools such as shell follow the same per-role rules. Pick a read-only agent when the task must not write. Denying delegate also disables cancel and nested delegation for that role.
Concurrent writes to one file are serialized per call for tools Chord executes itself, so two Chord-native workers cannot interleave edits to the same file. An external coding-agent backend runs its tools inside its own process, so its writes are outside that serialization. Serialization protects file integrity, not the coherence of overlapping changes; give parallel workers separate checkouts or Git worktrees when their work needs broader isolation.
Task identity is carried by semantic_task_key. Delegating with an explicit key that a live task already uses is rejected with already_exists, and you should continue that task with notify instead. Reusing a plan_task_ref without the same explicit key is only a hint: the new task still starts and its handle reports duplicate_detected with the other task’s ID, leaving the decision to you. Two different explicit keys identify separate deliverables and suppress that hint even when the plan_task_ref matches. The description is not compared.
Which roles a delegating agent may reach is a permission decision too: delegate rules match the agent_type argument, so a role can be limited to a subset of SubAgent definitions, and the Delegate tool then lists only those targets. See Permissions & Safety: Special permission semantics.
Delegated result contracts
Section titled “Delegated result contracts”delegate accepts an optional result_schema that declares what the worker’s delivered result must contain. The accepted vocabulary is type, required, properties, items, enum, and description, with type limited to object, array, string, integer, number, and boolean; the top level must be type: "object". A schema outside that subset is rejected at delegation time instead of being silently ignored, and undeclared fields always pass — a contract states that what you asked for is present and correct rather than enumerating everything the worker may return.
complete delivers the result inline (result) or as an artifact reference (result_ref, typically the ResultRef from save_artifact). Chord validates the delivered payload against the contract before accepting the completion: a violation is handed back to the worker with the offending paths and one corrected attempt. If the next delivery still violates the contract, the task fails, the rejection text names up to 20 violations, and the task settlement keeps the machine-readable diagnostics. A result_ref whose content cannot be read back fails immediately, since a retry cannot repair the store. Without result_schema, delegation behaves as before.
A worker that cannot deliver a successful result can report the blocker with a non-empty blocked_reason; Chord then fails the task without requiring a payload that satisfies result_schema. Use this route when the worker’s role cannot use escalate.
An agent that runs on an external backend has no complete tool, so the contract travels a different path with the same rules: it is delivered to the external process as part of its role instructions at initialization, and its final answer must be a single JSON object satisfying the schema. A final answer that is not a JSON object, or that does not satisfy the schema, fails the task with the violations named; there is no in-process correction turn, so retry the delegation if the external agent needs another attempt.
Completion reports
Section titled “Completion reports”A worker reports the checks it actually ran and their results in complete.summary, lists checks it did not run in remaining_limitations, and uses artifacts for full logs when needed. The owner reviews the report against the task’s requirements. Chord does not reject completion solely because no check ran or assign a verification status from command exit codes.
The owner report lists the worker’s complete.files_changed declarations as reported_files_changed and paths Chord observed through its tools as actual_files_changed. Observed paths take precedence when reviewing attribution, but they describe writes and deletions during the task, not the final diff or code correctness. An empty observed list does not prove that no files changed, and a reported path without an observation does not by itself establish a false report. When Chord cannot fully attribute writes, the report includes file_attribution_incomplete.
When the two recorded lists can be compared as text, the report also adds reported_only_in_records and observed_only_in_records lines listing paths that appear in only one of them (up to three examples each), followed by one file_list_note line. The comparison uses the retained path spellings, does not resolve them against the current filesystem, and is omitted when the lists cannot be compared safely, such as when absolute and relative paths are mixed. A difference does not establish that a change is missing or that a self-report was false; file_attribution_incomplete can itself produce one.
A compaction checkpoint carries up to 128 observed paths. If there are more, it keeps the incomplete-attribution flag; session restoration merges the retained paths and later observations without recovering paths that the checkpoint omitted. Writes inside external coding-agent processes cannot be attributed to individual files by Chord.
Escalation
Section titled “Escalation”escalate is the SubAgent-side way to ask its owner for help, and a required kind says which of two things it means:
needs_repair— the task is stuck on something only the owner can decide or provide. The request is delivered as a mailbox message and the worker parks inWaitingMainuntil you answer; the task keeps running.blocked— the worker judged the attempt a dead end. The task closes as failed with the stated reason (owner card AGENT BLOCKED,risk_alertmailbox,on_agent_errorhook witherror_kind: blocked) instead of parking.
A task may leave two needs_repair escalations unanswered; a third is refused back to the worker (the escalate card reports an error) with a notice to make progress independently or close out with complete. That limit is the only convergence for a worker stuck re-escalating the same blocker: every escalation re-enters WaitingMain and resets the lifecycle timers, so the stall timeout never catches the loop. Answering that escalation clears the budget; other deliveries to the worker do not.
Notifications and replies
Section titled “Notifications and replies”- Owner update: omit
target_task_id. Usemessage_type: progress(the default) ornotice; optionalsubtype,correlation_id, and a JSON-objectpayloadup to 32 KiB are available for this form. MainAgent cannot send owner updates. - Plain targeted message: provide
target_task_id,message, and optionallykind. Omitmessage_type,subtype,correlation_id, andpayload. Use this form for corrections or follow-up work. - Reply to a pending request: provide
target_task_id,message_type: response, and the request’s requiredcorrelation_id, together withmessageand optionallykind. This form does not acceptsubtypeorpayload. Roles that can only notify their owner cannot send targeted replies.
Long-text control tools
Section titled “Long-text control tools”done, complete, and escalate may carry a long Markdown report, summary, or escalation reason. While the arguments are still streaming, the TUI shows a temporary N chars received indicator; once they are complete, the prose is rendered as Markdown in the card body. complete also keeps structured completion details: changed files, remaining limitations, known risks, follow-up recommendations, and artifact references.
These cards are always expanded and their header is only the tool name: the report is the card. The same applies to compact_context, delegate, question, notify, write, edit, apply_patch, delete, todo_write, and handoff: no disclosure marker, and the fold keys leave them as they are. Only read, grep, glob, shell, cancel, and generic tool calls fold, marked with ▸ / ▾. See Usage: TUI basics for the fold keys and how collapsed cards look.
delegate has one tool result: the asynchronous startup handle. Later complete calls and mailbox updates are separate runtime events that update the existing delegated task/card by stable task_id; they never produce additional delegate tool results. Each complete report raises an owner-visible AGENT COMPLETE notification card, and terminal worker failures are shown as AGENT BLOCKED and wake the direct owner.
Delegated task boundaries
Section titled “Delegated task boundaries”Agent-to-agent messages respect request boundaries: if the target is busy, the message is queued and included in its next LLM request instead of interrupting the active one; a resumable idle target is woken to receive it.
Progress and notice updates sent to an idle main agent are not purely informational: every undelivered update is kept and delivered in the order it was produced, and at the next between-turn boundary Chord merges the pending updates into a single delivery batch that wakes the main for one extra turn (one extra LLM request) before it can go quiet again.
Mailbox and coordination state is durable: parent-child request/response records and queued payloads survive compaction and restart, and delivery stays idempotent across task rehydration.
The runtime, not the model, is the source of truth for delegation state. A worker that fails to emit a coordination tool (complete, escalate, or notify) receives one bounded follow-up request; if it still cannot comply, or provider/model retries are exhausted, Chord marks it failed, records a risk_alert, and wakes the owner. A rehydrated runtime may receive a new agent_id; coordination should continue through the stable delegated task_id.
MCP tools
Section titled “MCP tools”| Tool | What it does |
|---|---|
tool_search |
Find and load MCP tool definitions by a natural-language query or exact tool_names. Returns up to five definitions without executing them. Available when at least one deferred MCP tool is available and visible under the current agent’s permissions. |
Set deferred: true on an MCP server to load its tools through tool_search instead of including all definitions in every request. This does not enable a disabled server or change tool permissions. See Configuration: load MCP definitions on demand.
Tools exposed by configured MCP servers are registered as mcp_<server>_<tool> (for example mcp_search_web_search_exa) and can be referenced in permission rules by that full name. Use allowed_tools in the MCP server config to limit which remote tools are registered at all; see Configuration: MCP. Calls a model issues in one response can run concurrently when their resources do not conflict, including multiple calls to one server. Each result is returned separately so the model can inspect a failure and decide whether a retry is safe.
Tool discovery follows all pages before updating the directory. A discovery is limited to 1,000 pages, 10,000 tools, and 32 MiB of combined result JSON. A repeated cursor, duplicate remote tool name, invalid page, or exceeded limit fails discovery; an earlier complete directory is kept when available. Check the server’s list response and Chord’s log if tools are missing.
Tool results include text and embedded text resources. Images, including embedded image resources, use the same image normalization described above. Structured JSON results become text unless an existing text block already contains the same JSON. Resource links show their name and URI without fetching them. Audio, other binary resources, and unsupported content types produce an omission notice. An unreadable image also produces a notice while preserving the text. Results marked as errors remain failed tool calls.
When a server declares outputSchema, Chord validates successful structuredContent against it. A mismatch, missing structured content, or an invalid or unsupported schema adds a warning while preserving the result text and usable images. The warning does not trigger an automatic retry; check an action’s effects before repeating it. Schemas use JSON Schema draft 2020-12 by default or a supported draft declared with $schema; references must resolve within the schema document, with no file reads or network requests. Validation checks structure, not factual accuracy.
An MCP failure has three outcomes. When Chord can rule out delivery — invalid arguments, an unavailable connection or authorization, or a rejection before sending — the call fails with its concrete error and no uncertainty note. A valid JSON-RPC error or isError receipt is a reported server-side failure; it does not prove the operation was rolled back. If the request may have been sent but no matching, trustworthy receipt arrived — a disconnect or timeout after sending, an error response without a call receipt, a truncated or mismatched result, or a stdio EOF — the result is marked as outcome unknown. The tool card still ends as failed, and the model result tells the model to verify the external state before retrying. Chord does not replay the call automatically.
Cancelling or replacing a turn closes every declared call once. A call that already produced a usable result keeps it; a call that passed execution admission but has no result settles as outcome unknown rather than as “never started”. A restored session applies the same rule when the started record exists without a saved result.