Agent reference: workflow & run tools
This page is the lookup surface for the 33 MCP tools that author, run, and accept workflows: 23 workflow_* tools, 3 workflow_node_instructions_* tools, and 7 mission-run/changement tools, in eight groups. For step-by-step procedures, use the cookbook; when a call refuses, the refusals page maps every token to a recovery.
Who this is for
You are an MCP-connected agent — or the operator driving one. Every tool on this page returns the same envelope: { success, data } on success, { success: false, error, code } on refusal. All of these tools require tenant-admin rights; if a call fails authorization, that is a permissions problem, not a workflow problem.
This page tells you what each tool does and what it returns. For how the machinery works underneath — compilation, branches, seals — read the workflow architecture chapter.
The two legal entry surfaces
A published workflow executes through exactly two surfaces: workflow_invoke and mission_run_start — everything else on this page authors, inspects, or accepts.
workflow_invoke— workflow-first. Compiles a published version into a fresh mission it creates for you. Use it when the work has no mission yet.mission_run_start— a run on an existing mission. The run gets its own branch off the mission tip and enters the acceptance loop: bornProposed, then you accept or discard it. Use it when the work belongs to a mission you already have.
The human-side walkthrough of that loop is Runs, acceptance & changements.
Authoring & lifecycle (9 tools)
These take a graph from empty draft to frozen published version. Drafts are the only editable state; publishing freezes the graph — see The workflow lifecycle.
| Tool | Purpose | Key inputs | Returns | Refusal codes |
|---|---|---|---|---|
workflow_create_draft | Create a new draft version from a graph payload. Omit workflowId for a new identity at version 1; supply it to open the next version. | graphJson; optional workflowId, tunnelsJson | { id, workflowId, version, status } | — |
workflow_update_draft | Replace a draft's graph and tunnels. Drafts only. | id, graphJson; optional tunnelsJson | { id, workflowId, version, status } | NOT_FOUND · CONFLICT (not a draft) |
workflow_materialize | Inject the required governance controls into a draft, deterministically, from the active control catalog. Run it before publish on governed graphs; idempotent. | id | { id, workflowId, version, status } | NOT_FOUND |
workflow_waive_control | Record an explicit, reasoned, audited waiver for a missing required control. Some controls are non-waivable and refuse. | id, controlId, reason | { id, workflowId, version, status } | NOT_FOUND; non-waivable control |
workflow_validate_draft | Dry-run validation — the same validator publish uses, aggregating every problem in one pass. Changes nothing. | id | the full problems list | — (problems are returned, not raised) |
workflow_publish | Validate, then freeze the draft into an immutable, checksummed published version. | id | { id, workflowId, version, status, checksum, publishedAt } | VALIDATION_ERROR (every issue listed at once) |
workflow_rename | Set the display name, shared by all versions. The name lives outside the checksum, so renaming a published workflow is allowed. | workflowId, name | { workflowId, name, updatedVersions } | NOT_FOUND |
workflow_archive | Archive a published version — terminal, kept for provenance. | id | { id, workflowId, version, status } | CONFLICT (not Published, or a published workflow still references it — check workflow_referenced_by first) |
workflow_delete_draft | Permanently delete a draft version. Destructive. | id | { id } | CONFLICT (not Draft) |
Composition (3 tools)
Workflows compose by reference: a FlowRef node embeds another published workflow as a sub-workflow.
| Tool | Purpose | Key inputs | Returns | Refusal codes |
|---|---|---|---|---|
workflow_tile_catalog | List the published tiles you can embed as sub-workflows — including the sys- building blocks — each with the pin surface it projects. | — | the tile list | — |
workflow_rebind_flowref | Re-point a FlowRef in a draft to a different target workflow or version. Rebinding invalidates gate ratification: approvals given on the old binding must be given again. | draft id, the FlowRef node, the new target | the updated draft | NOT_FOUND · CONFLICT (not a draft) |
workflow_referenced_by | List the published workflows that reference this one. Call it before archiving: archive refuses while this list is non-empty. | workflowId | the consumer list | — |
Discovery & observation (6 tools)
| Tool | Purpose | Key inputs | Returns |
|---|---|---|---|
workflow_catalog | The node-type palette: all 138 node types across 17 categories, each with its typed input/output pins. lifecycle is Standard or Legacy; placing a Legacy node in a new draft is publish-blocked. Read it before authoring so you wire compatible pins. | — | the catalog with per-type pins |
workflow_list | All versions of one workflow, newest first. | workflowId | versions with status, checksum, dates |
workflow_list_all | The latest version of every workflow in the tenant. | — | one row per workflow |
workflow_get | One version with its full graph payload. version=0 (or omitted) means the latest published version. | workflowId; optional version | the full version, including graphJson |
workflow_runs | The runs launched from a workflow, newest first. | workflowId; optional version filter | the run list |
workflow_run_nodes | Per-node status of one run — maps the run's tasks back to the authoring node ids. | the run's mission id | per-node statuses (see Node run states) |
Execution (1 tool)
workflow_invoke — run a published version, workflow-first.
- Inputs:
workflowId,version(must be ≥ 1 — running "whatever is latest" is never implicit), optionalobjective,model,provider,paramsJson,projectId,presetId(+forceOnAllCallSites),agentBudgetJson(+forceBudgetOnAllAgentSites). - Parameters bind at compile time. The values in
paramsJsonare bound when the graph is compiled into the new mission's plan; nothing rebinds mid-run. - Model resolution is explicit.
modelandproviderare required unless tenant defaults resolve them — there is no silent model fallback. - Presets are the preferred lever.
presetIdruns this invocation with a named preset instead of a rawmodel; an unknown preset refuses withNOT_FOUNDrather than falling back. By default it replaces only the workflow-level default preset — a step that pinned its own preset at edit time keeps it — unless you also passforceOnAllCallSites. - Per-run agent budgets.
agentBudgetJsonadjusts agent budgets for this run only, applied axis by axis. By default a stated axis stands in for the engine default only — it fills the axes a step's authored budget leaves unstated, and a step that authored that axis keeps its own value — unless you also passforceBudgetOnAllAgentSites, which pushes the stated axes onto every agent site, outranking what the step authored. A malformed override refuses withVALIDATION_ERRORbefore any mission is created. - Project targeting is explicit and fail-loud.
projectId(id or slug) aims the run's writes at a project: an unknown target refuses withNOT_FOUNDand a non-Active project withCONFLICT, both before any mission is created. Omit it and the run lands in the tenant's default project — recorded as such in the mission's provenance. - Returns the new
missionIdwith step, gate, and control counts. Every gate is born paused behind a pending decision. - Follow-ups:
mission_getto watch the mission,decision_listto find pending gates,workflow_run_nodesfor per-node status.
Cloning (2 tools)
| Tool | Purpose | Key inputs | Returns |
|---|---|---|---|
workflow_clone_from_mission | "Save this run as a workflow." Clones a mission into a new draft — never publishes. A workflow-born mission is re-drafted verbatim from its source; an organic mission is reconstructed from its tasks, and notes lists every repair made on the way. | the mission id | { id, workflowId, version, status, source, notes }; source = workflow-born | organic |
workflow_clone_from_system | Clone a system template into a fresh draft your tenant owns. | the template key | { id, workflowId, version, status } |
System templates (2 tools)
| Tool | Purpose | Key inputs | Returns |
|---|---|---|---|
workflow_system_list | List the platform's 22 read-only gallery templates. | — | template summaries |
workflow_system_get | One template with its full graph, so you can inspect it before cloning. | workflowKey | the template, including graphJson |
Templates are representational: cloning gives you a graph to own and edit, not a wire into the platform's internal flows. The full enumeration of the 22 lives on System templates.
Node instructions (3 tools)
Coder and agent nodes can carry an instruction binding — override text that replaces the node's authored instructions at the next dispatch, without touching the published graph or its checksum. Exactly one binding applies — the most specific wins: run > project > tenant > global.
| Tool | Purpose | Key inputs | Returns |
|---|---|---|---|
workflow_node_instructions_get | Read a node's authored text, the winning binding (if any), and the effective text dispatch would use. | the node reference; optional scope | authored, binding, effective |
workflow_node_instructions_set | Set the manual instruction text at one scope. | the node reference, scope, text | the updated slot |
workflow_node_instructions_clear | Remove the manual instruction at one scope. | the node reference, scope | the cleared slot |
Only manually-set slots are writable through these tools; a slot owned by the platform's prompt-engineering machinery refuses with CONFLICT. ARDS proposing prompt improvements on its own is not in v1; if that lands, proposals will arrive as decisions you approve — nothing will ever apply itself. See Governance for the human-side view.
Mission runs & changements (7 tools)
The acceptance loop on an existing mission. Strict-sequential by default: one undecided run at a time, each accepted run landing as one changement on the mission branch. Pass the same groupId to several starts to open a competition instead — one winner, siblings rejected.
| Tool | Purpose | Key inputs | Returns | Statuses |
|---|---|---|---|---|
mission_run_start | Start a run of a published version on an existing mission. The run branches off the mission tip and is born Proposed. | the mission id, workflowId, version; optional groupId | the run id + a status token | the 11 run-start statuses |
mission_run_get | One run with its per-node roll-up, its changement once accepted, and its seal anchors. isAnchored is true only once the run is accepted, its changement applied, and its seal passed. | the run id | the run detail | — |
mission_run_accept | The unit of acceptance: re-checks the run's base against the mission tip, runs the physical-validation floor (fail-closed), merges, and records exactly one changement. | the run id | the changement on success | the 7 run-accept statuses |
mission_run_discard | Drop an unaccepted run: marks it Rejected and deletes its branch. Nothing landed, so there is nothing to undo. | the run id | confirmation | — |
mission_changement_stack | The mission's changements in ordinal order, each with its touched files and the prior changements it depends on. | the mission id | the stack | — |
mission_revert_preview | Preview a revert: the changement plus the transitive closure of its dependents, in the reverse order they would be reverted. Changes nothing. | the mission id, the changement | the cascade | — |
mission_revert | Execute the previewed cascade, newest first, fail-closed: a conflict aborts cleanly and names the failing member — nothing partial lands. | the mission id, the changement | the reverted list | — |
The human-side walkthrough — accept, discard, revert, competition — is Runs, acceptance & changements.
Mission context
Four neighbouring tools you will meet in every workflow session; the full mission surface is documented in Missions & tasks.
mission_propose drafts a mission and routes it for approval instead of creating it outright — the proposal arrives as a decision a human accepts or rejects. You never approve your own proposal.
mission_create creates a mission directly. Attach a workflow at creation, or start runs on it later with mission_run_start.
mission_decompose asks the planner to break a conversation-born mission into tasks. Missions that carry a workflow skip this: the graph already is the plan.
decision_respond is the single gate-resolution verb. Its resolutions map onto a paused gate as: approve releases the gate once prior steps complete; skip cancels the gated step; fail fails it. Leaving the decision unresolved keeps the run paused. Pending gates are listed by decision_list and appear in the Decisions queue.
Status vocabularies
Normative token tables. Tokens are returned verbatim; match on them exactly. Per-token recovery detail lives in Refusals & failure modes.
Run-start statuses
Returned by mission_run_start. One success token, ten refusals.
| Token | Meaning | What to do |
|---|---|---|
Started | The run was created on its own branch off the mission tip, born Proposed. | Watch it with mission_run_get; resolve gates via decision_respond. |
FeatureDisabled | Workflows:MissionRuns:StartEnabled is off in this environment. | Ask your operator to enable it — see Refusals & failure modes. |
AgenticMissionUnsupported | This mission's type can't host workflow runs. | Use a standard mission, or create one with workflow_invoke. |
MissionTerminal | The mission is already Completed, Failed, or Cancelled. | Start the run on a live mission, or invoke a fresh one. |
MissionNotPlanned | The mission hasn't reached a planned state yet. | Wait for planning to finish, then retry. |
ChildSpawnerDisallowed | The graph contains a node that spawns child missions — disallowed inside a mission run. | Run that workflow through workflow_invoke instead. |
RunAlreadyOpen | Strict-sequential: an undecided run is already open on this mission. | Accept or discard the open run first — or compete with the same groupId. |
TipUnavailable | The mission tip couldn't be resolved. | Retry; if it persists, see Refusals & failure modes. |
WorkflowNotFound | No workflow matches that workflowId and version. | Check with workflow_list. |
NotInvocable | That version isn't Published. | Publish the draft, or pick a published version. |
MaterializationFailed | Compiling the graph into the run's tasks failed. | Read the returned error; the causes are catalogued in Refusals & failure modes. |
Run-accept statuses
Returned by mission_run_accept. One success token, six refusals.
| Token | Meaning | What to do |
|---|---|---|
Accepted | Validated and merged; exactly one changement recorded; the mission tip advanced and stays green. | Read the stack with mission_changement_stack. |
StaleRefused | The mission tip moved since the run branched. | Start a fresh run off the new tip — never force. |
MergeConflict | The run branch no longer merges cleanly onto the tip. | Discard it and start a fresh run off the current tip. |
GroupAlreadyWon | Another run in this competition group was already accepted. | Nothing — the group is decided; losing branches are deleted. |
ValidationRefused | Acceptance is physical, and the check is fail-closed: if validation does not pass — or no validation backend is reachable in your environment — the accept is refused rather than waved through. The run stays Proposed; nothing merges. | Confirm a validation backend is available (ask your operator), then retry — see Refusals & failure modes. |
NotProposed | The run isn't in Proposed — it was already accepted or discarded. | Check mission_run_get. |
TipUnavailable | The mission tip couldn't be resolved. | Retry; if it persists, see Refusals & failure modes. |
Run outcomes
The lifecycle of a run itself — the same tokens as the states cheatsheet.
| Token | Meaning | What to do |
|---|---|---|
Proposed | Born state: the run's changes exist on its branch and nowhere else. | Inspect it, then accept or discard. |
Accepted | The merge passed physical validation; one changement landed. | — |
Rejected | Declined — dropped via discard, or auto-rejected when a competing sibling was accepted; the branch is deleted; nothing landed. | — |
Superseded | Replaced by another run; no longer in play. | — |
Version statuses
The only legal transitions are Draft → Published → Archived.
| Token | Meaning | What to do |
|---|---|---|
Draft | Editable — the only state workflow_update_draft and workflow_delete_draft accept. | Iterate, validate, publish. |
Published | Frozen and checksummed; runnable; never silently mutated. | To change it, open a new draft version. |
Archived | Terminal; kept for provenance; no new runs. | — |
Node run states
Per-node statuses as reported by workflow_run_nodes and the mission_run_get roll-up.
| Token | Meaning | What to do |
|---|---|---|
Pending | Upstream steps haven't finished; the node isn't eligible yet. | Nothing — normal. |
Ready | Eligible, waiting to be dispatched. | Nothing — normal. |
Dispatched | Handed to its executor, not yet reporting progress. | Nothing — normal. |
InProgress | Executing now. | Watch via workflow_run_nodes. |
Completed | Finished successfully. | — |
Failed | Finished unsuccessfully; the roll-up carries the failure reason. | See Refusals & failure modes. |
Cancelled | Stopped by the mission or an operator. | — |
Paused | Waiting on a human decision or an event. | For gates: decision_list, then decision_respond. |
AwaitingGate | Derived from Paused: this specific pause is a gate awaiting a decision. | Resolve it with decision_respond. |