MCP tools
Every tool the run-scoped MCP server advertises, its arguments, and whether it reads the run or acts on it.
MCP server tools — 12 rows exported from
src/mcp/tools.rs
The read tools
run_status
The resolved run's registry row, re-read at call time: title, lifecycle state, progress line, `state_units` and `display_tasks` counts, worktree and branch, the recorded stop, and the owning process and its cleanup state.
Takes no arguments.
Any argument not listed above is rejected.
list_runs
The same row `run_status` returns, for every gantry run visible in the repo — not just the scoped one. Returns every run unless `scope` is "active", which returns the non-finished set ordinary `gantry list` shows.
| argument | accepts | what it is |
|---|---|---|
|
scope
optional |
string · one of all, active | `all` (default) returns every run; `active` returns every non-finished run, matching ordinary `gantry list`. |
Any argument not listed above is rejected.
read_ledger
The run's PROGRESS.md ledger, one row per projected task: its id, task path, title, latest ledger status, and whether the ledger has it DONE.
Takes no arguments.
Any argument not listed above is rejected.
read_plan
The run's `about.md` card as stored: the project title and description, a block per task, and the gate summary.
Takes no arguments.
Any argument not listed above is rejected.
list_tasks
The run's tasks as the pattern declares them, under the pattern's name: a tree of nodes each carrying its id, task path, title and status, nested to the depth the pattern runs at.
Takes no arguments.
Any argument not listed above is rejected.
read_report
A named diagnosis report under the run's reports/ directory.
| argument | accepts | what it is |
|---|---|---|
|
name
required |
string | The report file name under reports/. |
Any argument not listed above is rejected.
tail_history
Recent records from the run's history.jsonl activity journal, with line/byte bounds.
| argument | accepts | what it is |
|---|---|---|
|
lines
optional |
integer · at least 0 | Trailing line count to return. |
|
max_bytes
optional |
integer · at least 0 | Maximum bytes to return. |
Any argument not listed above is rejected.
tail_log
A named stage log with line/byte bounds. `task_path` addresses the log by a task's position in the run tree — its enclosing sub-orchestration ids, outermost first — so a log at any depth is reachable; omit it for a run-root log.
| argument | accepts | what it is |
|---|---|---|
|
lines
optional |
integer · at least 0 | Trailing line count to return. |
|
max_bytes
optional |
integer · at least 0 | Maximum bytes to return. |
|
name
required |
string | The log file name under the selected task's logs/. |
|
task_path
optional |
array of string | The task's position in the run tree — its enclosing sub-orchestration ids, outermost first. Omit or empty for a run-root log. |
Any argument not listed above is rejected.
worktree_info
The run's worktree git state: branch, porcelain status, the 20 most recent commits, and the diff from the merge-base with the run's pinned home branch, bounded to 64 KiB. A run merged back and its worktree removed answers `live: false`.
Takes no arguments.
Any argument not listed above is rejected.
list_processes
Every process group the run recorded, from the same process model `gantry ps` and the build-run processes overlay render: the owning engine, and per group its state (live, stray, reaped, exited, stale), its process-group id, what it was spawned for, and its recorded and sampled fields. Read-only: it takes no arguments, signals nothing, and reports a stray group's remedy only as the `gantry stop <name>` command string.
Takes no arguments.
Any argument not listed above is rejected.
The action tools
run_bash
Run a shell command in the run's worktree with the same wrapper state gantry uses for coding agents. The built-in process fence keeps a writable host view and binds the main checkout read-only with Git metadata and declared run-record outputs carved back writable; custom wrappers pass through verbatim, and disabled or degraded runs use no wrapper. The descriptor reports wrapper state, and each result reports whether the process fence, a custom wrapper, or no wrapper was active.
| argument | accepts | what it is |
|---|---|---|
|
command
required |
string | The shell command to run in the run's worktree. |
|
timeout_secs
optional |
integer · at least 1 | Per-call wall-clock timeout in seconds (default 120, capped at 3600). |
Any argument not listed above is rejected.
answer_prompt
Answer a pending prompt on the run's live engine, correlated by its prompt id — a run-control action over gantry's command channel. The answer's form must match the prompt's kind, or it is refused. Fails cleanly when no live engine is attached.
| argument | accepts | what it is |
|---|---|---|
|
choice
optional |
string | The chosen option, which answers a choice prompt and nothing else; it must be one of the choices the prompt offered. Provide exactly one of confirm, text, or choice. |
|
confirm
optional |
boolean | The y/N answer, which answers a confirm prompt and nothing else. Provide exactly one of confirm, text, or choice. |
|
prompt_id
required |
integer · at least 0 | The correlation id from the PromptNeeded event identifying the pending prompt to answer. |
|
text
optional |
string | The free-text answer, which answers a text prompt and nothing else — free text is never read as approval, so a choice or confirm prompt refuses it. Provide exactly one of confirm, text, or choice. |
Any argument not listed above is rejected.