orcho-mcp

v0.11.1
orcho-mcp Checked 3 days ago Published 2 months ago

Orcho — Model Context Protocol server for Claude Code, Cursor, Zed, and other MCP-speaking clients

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

orcho_workspace_info

Return where orcho reads/writes runs and which projects appear in recent history. Useful as an initial discovery call so the client knows whether other tools that need ``project_dir`` will succeed.

orcho_workspace_state

Return advisory MCP workspace state — last observed cursor per run. Reads ``<ORCHO_WORKSPACE>/mcp/state.json`` (written by every ``orcho_run_events_summary`` and ``orcho_run_watch`` call). Useful for reconnect after a client/session restart: instead of replaying from ``since_seq=0``, callers pick the run's ``last_seq`` and pass it back as ``since_seq``. **Advisory only.** The canonical truth is each run's ``events.jsonl`` + ``meta.json``. A missing or corrupt state file is recreated as an empty envelope on the next observation, so this tool never fails on that account. The state file cont…

orcho_workspace_pending_decisions

List the runs awaiting an operator phase-handoff decision. The typed way for a captain to recover pending operator decisions *without chat memory*: it scans the workspace runs directory for runs on ``status=awaiting_phase_handoff`` and returns one bounded row per run. **Default view = the operator's decision inbox.** By default this answers "what needs my decision *now*", not "what historical artifact is paused somewhere". It returns only ``actionable`` rows — runs whose recorded ``meta.project`` path still exists *and* lives under the resolved workspace scope. In the standard ``workspace-…

ParameterTypeDescription
include_staleboolean
limit

orcho_workspace_cleanup_report

Preview what a workspace cleanup would reclaim. Changes nothing. A long-lived workspace accumulates retained checkouts from finished runs. This is the read-only half of reclaiming that space: it runs the engine's real selection and reports what it picked, what it is holding back, and why — without touching a single file. **Read the buckets, not just the totals.** ``reclaimable_*`` is what the matching reclaim call would remove. ``protected_*`` is what the engine refuses to touch because the work is still at risk — dirty, unpushed, or resumable — and the per-reason breakdown says which.…

ParameterTypeDescription
forceboolean
older_than_days

orcho_workspace_cleanup_reclaim

Remove reclaimable checkouts confirmed by a prior cleanup report. **Destructive.** This is the acting half of workspace cleanup: it deletes or archives retained checkouts, and under ``tier='both'`` their run roots too. Call ``orcho_workspace_cleanup_report`` first, show the operator what it selected, and only then call this with that report's ``confirm_token``. The token is re-verified against the live workspace before anything is touched. A token that was never issued, or one issued against a selection that has since changed, raises ``WorkspaceCleanupConfirmationError`` and nothing is remov…

ParameterTypeDescription
confirm_token *string
disposition *string
tier *string
forceboolean
older_than_days

orcho_run_history

List the most recent runs, newest first. Args: limit: max number of runs to return (default 10). project_dir: optional filter — only include runs whose meta.json ``project`` field equals this path. Path is compared as-is (no resolution); pass an absolute path to match how orcho records it.

ParameterTypeDescription
limitinteger
project_dir

orcho_run_status

Durable status snapshot for one run — not the live-progress view. Summary snapshot for a single run: status, phase progress, metrics summary, lineage, immutable cross-execution graph/state (when present), attention signals, available artifacts, and ready next actions. For live progress — where the run is right now and the subtask position (index/total) — use ``orcho_run_live_status``. Reach for this tool for the durable meta + gate snapshot and pause/delivery checks; use ``orcho_run_evidence`` for proof, ``orcho_run_metrics`` for consumption, and ``orcho_run_diff`` for patch content. R…

ParameterTypeDescription
run_id *string
include

orcho_run_metrics

How much did it consume? Raw ``metrics.json`` for one run: token counts, durations, per-phase breakdown, attempts / retries, and cost-reference fields when the runtime recorded or Orcho estimated them. Use ``orcho_run_status`` first when metrics may not exist yet.

ParameterTypeDescription
run_id *string

orcho_run_events_tail

Return events with seq > since_seq, newest events at the end. Designed for catch-up after a client reconnect: client persists the last-seen seq, calls this tool with ``since_seq=last_seen`` and gets everything missed since. ``next_seq`` is the highest seq returned (or ``since_seq`` if nothing new). ``eof=True`` means no events remain after ``next_seq`` at this snapshot — caller can stop polling until the run state changes. Args: run_id: the run to tail. since_seq: only return events with seq strictly greater. Default 0 returns all events from the start. limit: cap on re…

ParameterTypeDescription
run_id *string
limitinteger
since_seqinteger

orcho_run_events_summary

Return a bounded summary of a run's recent events. The agent's typical question while a run is in flight is "what changed and what should I do next?" — not "give me every raw event." This tool answers the first question in a single bounded payload, so status polling no longer triggers MCP tool-result auto-spill on the client side. This tool is also the fallback half of the resilient observation loop ``orcho_run_watch`` → ``orcho_run_events_summary`` → ``orcho_run_watch``. When a bounded ``orcho_run_watch`` times out or the client transport drops the long-poll, call this with ``since_se…

ParameterTypeDescription
run_id *string
last_ninteger
limitinteger
since_seqinteger

orcho_run_live_status

Where is this run right now, and what do I do next? (subtask progress index/total) One typed snapshot that answers "where is this run right now, and what should I do?" — including live subtask position (index/total) — in a single bounded payload. This is the go-to view for live progress and where-is-the-run. It is a bounded operator-safe live status card for a mono run: built for high-frequency polling, with every embedded preview truncated and no full phase bodies, critiques, or raw logs ever riding along. It unites the durable meta status (with supervisor terminal fallback), the live ph…

ParameterTypeDescription
run_id *string

orcho_run_watch

Long-poll a run until something meaningful happens. ``until="next_event"`` also wakes on durable gate progress before command completion. Reconnect with the returned sequence cursor. Holds the MCP request open until the chosen ``until`` condition fires or ``timeout_s`` expires. Designed to replace manual re-polling of ``orcho_run_status`` / ``orcho_run_events_summary`` during long phases (implement, repair) where minutes can pass between user-relevant events. When the MCP request carries a ``progressToken``, ordered ``notifications/progress`` are emitted as the event sequence advances (one n…

ParameterTypeDescription
run_id *string
interaction_clientstring
since_seqinteger
summaryboolean
timeout_sinteger
untilstring

orcho_plan_validate

Validate an architect plan document. Provide exactly one of ``markdown`` or ``path``. Wraps ``pipeline.plan_parser.parse_plan`` — same semantics as the pipeline's own DECOMPOSE_QA gate. Returns ``ok=False`` with a human-readable error rather than raising for parse/DAG failures, so the LLM caller can read the error and try again. InvalidPlanError is raised only for invalid arguments (both sources or neither).

ParameterTypeDescription
markdown
path

orcho_skills_list

Discover Agent Skills packages visible to the project. Walks the canonical multi-source chain (project / compat / workspace / user / entry-point packages); returns a deterministic registry snapshot. Trust gating defaults to the safe policy (project + compat sources OFF until the user opts in via plugin config); MCP introspection is read-only and per-call. Returns an empty list when no source yields a SKILL.md — that's the 'flat developer-agent mode' fallback, not an error.

ParameterTypeDescription
project_dir *string

orcho_prompts_resolve

Resolve a prompt template through the 3-level chain (project → workspace → core). Returns the chain (with exists flags) and the content of the winning entry. If ``project_dir`` is None, only the core level is consulted.

ParameterTypeDescription
name *string
project_dir

orcho_profiles_list

Return the catalogue of pipeline profiles. Reads the canonical v2 profile catalogue exclusively. Result shape: * ``source="json_v2"`` — v2 file loaded successfully; ``profiles`` carries the catalogue; ``diagnostic`` is None. * ``source="missing"`` — no v2 file at the resolved path; ``profiles=[]`` and ``diagnostic`` explains the cause + expected location. MCP clients SHOULD surface the diagnostic to the user (it's actionable: "install orcho-core ≥ 0.X" or "set ORCHO_PROFILES_V2_PATH"). ``source="missing"`` means no profile catalogue was found at the resolved pa…

orcho_workflows_list

Return the machine-readable catalogue of workflow recipes. Recipes describe how a sequence of MCP tool calls fits together (plan-then-implement, review a paused run, resume a crashed run, inspect a finished run). The server does not execute recipes — the client agent reads the steps and decides which tool to call next. Same payload is also published as the ``orcho://workflows`` resource; this tool exists so tools-only clients (which cannot read MCP resources) can still discover the catalogue. The result is stable across calls: recipe order, step order, and step ``id`` values do not shuffle…

orcho_run_start

Start a real run (mock or live) in a detached subprocess; return run_id now. This is the production run entrypoint: real-provider or mock, spawned as a detached subprocess with ``progressToken`` notifications, ``orcho_run_watch``, and ``orcho_run_cancel``. (For in-process mock-only smokes see the ``orcho_run_project_typed`` pair.) The run executes asynchronously in a detached subprocess. For live status, prefer ``orcho_run_watch`` — it holds the request open and returns the moment something meaningful changes (next event, phase change, handoff, or terminal), and emits ordered ``notificatio…

ParameterTypeDescription
attach
attach_binary
attach_image
attach_text
from_run_plan
max_rounds
mockboolean
mock_validate_plan_rejectinteger
output_modestring
profilestring
project_dirstring
session_modestring
task
task_file

orcho_run_project_typed

Mock-only, in-process typed run (blocking); for real runs use orcho_run_start. Drives a single-project pipeline run as a foreground library call — no subprocess. Pilot tool that calls orcho-core's typed silent boundary (``run_project_pipeline`` with ``presentation=PresentationPolicy.SILENT, no_interactive=True``) in-process instead of spawning a subprocess. **Blocks until the pipeline completes** and returns a compact :class:`TypedRunResult` carrying ``status``, ``halt_reason``, and the ordered event-spine ``kind`` values. Scope: * ``mock=true`` only — pilot does not drive real-provide…

ParameterTypeDescription
output_dir *string
project_dir *string
task *string
max_roundsinteger
mockboolean
profilestring

orcho_run_project_typed_async

Mock-only, in-process typed run (non-blocking); for real runs use orcho_run_start. Spawns a typed silent run in the background and returns run_id immediately — in-process (no subprocess), mock provider only. Non-blocking sibling to ``orcho_run_project_typed``. The pipeline body executes inside ``asyncio.to_thread`` so the MCP server's event loop stays responsive while the run is in flight. Returns a :class:`TypedRunStartedResult` with ``status="running"``; the final state is discovered by polling the existing read tools. Workspace-aware: the run directory lives at ``<workspace>/runspace/ru…

ParameterTypeDescription
project_dir *string
task *string
max_roundsinteger
mockboolean
profilestring

orcho_run_resume

Continue an interrupted run by spawning a new pipeline subprocess that loads the existing checkpoint via ``--resume``. ``runtime_override=None`` (default): a plain checkpoint resume — the run continues under its original per-phase runtimes/models. This is the overwhelmingly common case. ``runtime_override={phase, runtime, model}``: deliver an operator *replace* decision after a terminal provider-access failure. Before the resume subprocess spawns, the chosen pair is validated against the phase's configured replacement candidates and persisted into the run's durable ``meta.json``; the resum…

ParameterTypeDescription
run_id *string
operator_comment
operator_intent
profile
runtime_override

orcho_phase_handoff_decide

Resolve a pipeline paused at ``status=awaiting_phase_handoff``. Pure state transition — never spawns a process. The flow: 1. The pipeline pauses because a phase's declared ``handoff`` policy fired (e.g. ``human_feedback_on_reject`` on ``validate_plan`` after the plan loop exhausted its budget). ``meta.status`` becomes ``awaiting_phase_handoff`` and ``meta.phase_handoff`` carries the active payload, including ``id`` (the ``handoff_id``) and ``available_actions``. 2. Caller reads the active payload via ``orcho_run_status`` and decides: ``continue`` (manual o…

ParameterTypeDescription
action *string
handoff_id *string
run_id *string
feedback
note

orcho_criterion_decide

Record an operator's verdict on one ``human`` acceptance criterion. A ``human`` criterion (ADR 0188) is satisfied by exactly one thing: a person exercised it and said so. This tool is how that verdict becomes durable proof. Read the criterion first with ``orcho_run_evidence`` ``slice="criterion_matrix"`` — its ``method.instructions`` say what the operator must actually do, and the row's ``state`` says whether it is still ``pending``. **Never decide on the operator's behalf.** Do not infer ``accept`` from a passing test, a reviewer finding, a transcript line, a phase-handoff decision, or an…

ParameterTypeDescription
criterion_id *string
run_id *string
actor
decision
note

orcho_reconcile_delivery

Record an existing commit as this run's delivery through the core SDK. Use when ``orcho_run_diagnose`` recommends ``reconcile_delivery`` or an operator has delivered the run manually. The operator must have verified that the existing commit belongs to this run. Core discovers the commit and records its delivery with operator attribution and reconciled provenance. When the run's own delivery commit failed, core also accepts a commit the operator made by hand, whatever its message, if its only parent is the run's recorded delivery base and its tree equals the run's change. A rejected release re…

ParameterTypeDescription
operator *string
run_id *string
commit
note
runs_dir
workspace

orcho_handoff_advice

Ask the read-only advisor for a recommendation on a paused phase handoff. For a run paused at ``status=awaiting_phase_handoff`` on a rejected / incomplete verdict, this runs orcho-core's one-shot read-only advisor and returns its typed recommendation: ``recommended_action`` (``continue`` / ``retry_feedback`` / ``halt`` / ``continue_with_waiver``), ``confidence``, ``rationale``, ``retry_feedback`` text, ``risks``, ``expected_files``, ``operator_note``, ``parse_warnings``, a ``safety`` classification, the durable ``advice_artifact`` path, the ``provenance_note``, and a deterministic ``ready_nex…

ParameterTypeDescription
run_id *string
handoff_id

orcho_delivery_decide

Resolve a parked post-release delivery / correction gate. Pure state transition through the orcho-core SDK — never spawns a process and never applies a patch in MCP. Use ``orcho_delivery_gate`` first to inspect the gate and read its ``available_actions`` / ``blocked_actions``. Actions: - ``approve``: commit the retained worktree diff into the target checkout. - ``apply``: apply the retained diff without committing it. - ``fix``: mark the run correction-ready after a rejected release verdict. - ``skip``: close the gate without changing the target checkout. - ``halt``: leave the re…

ParameterTypeDescription
action *string
run_id *string
note

orcho_run_evidence

What happened / what proves it? Typed evidence slices for reconstructing why the run reached its current state: plan contract, findings, commands, artifacts, errors, receipts, verification, delivery, correction, and cross-run children. Use this for audit / post-mortem / proof; use ``orcho_run_status`` for the live operator snapshot, ``orcho_run_metrics`` for consumption, and ``orcho_run_diff`` for patch content. The full evidence bundle (``collect_evidence``) is exhaustive; this tool surfaces narrow projections control-loop clients actually need: what the plan said, which findings blocked th…

ParameterTypeDescription
run_id *string
phases
severity_min
slicestring

orcho_run_diff

What changed? Read a captured ``diff.patch`` artifact for a run: file stats, bounded preview, or full patch, optionally scoped to a path or phase. Use this for the changed-file / patch-content question; use ``orcho_run_status`` for the current run state and ``orcho_run_evidence`` for proof. The pipeline writes diff artifacts at run lifecycle time; this tool is the read side. Missing artifact is a typed ``found=False`` result — not a JSON-RPC error — because clean runs / quiet phases and runs predating the artifact are all valid. ``mode``: - ``"preview"`` (default) — Claude-style gro…

ParameterTypeDescription
run_id *string
max_bytesinteger
modestring
path
phase

orcho_run_diagnose

Diagnose a run's resume situation before acting on it — read-only. Returns a typed verdict so a control-loop client never has to guess whether resuming is safe, wasted, or wrong. Call this BEFORE any risky ``orcho_run_resume``: it classifies the run deterministically and hands back unambiguously typed next steps. ``condition`` (first-match priority): - ``active`` — running; watch / poll it (no resume needed). - ``stalled`` — core detected an over-budget startup without durable progress; inspect it and, when ``control='mcp_controllable'``, cancel it. ``recommended_next_actio…

ParameterTypeDescription
run_id *string

orcho_delivery_gate

Inspect an Orcho-managed run's post-release delivery / correction gate. Read-only typed projection that tells an agent, WITHOUT parsing terminal prose, whether a run is sitting at an Orcho-managed delivery decision or is just a direct checkout edit. The classification (``kind``), available actions, blocked actions, and default action are derived from orcho-core's SDK ``delivery_decision_state``: - ``delivery_decision_required`` — a pending delivery on an APPROVED release; core may allow approve / apply / skip / halt (``approve`` is the only action that creates a commit). - ``co…

ParameterTypeDescription
run_id *string

orcho_run_cancel

Stop a running pipeline. ``mode="graceful"`` sends SIGTERM to the run's process group; pipeline catches it, flushes the checkpoint, and emits a ``run.interrupted`` event. ``mode="hard"`` sends SIGKILL; in-flight LLM HTTP requests drop immediately and the checkpoint reflects only fully-completed phases. Works for runs spawned this server lifetime as well as orphans picked up by restart-recovery (cancel via raw ``os.kill`` on the persisted pid).

ParameterTypeDescription
run_id *string
modestring