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: born Proposed, 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.

ToolPurposeKey inputsReturnsRefusal codes
workflow_create_draftCreate 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_draftReplace a draft's graph and tunnels. Drafts only.id, graphJson; optional tunnelsJson{ id, workflowId, version, status }NOT_FOUND · CONFLICT (not a draft)
workflow_materializeInject 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_controlRecord 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_draftDry-run validation — the same validator publish uses, aggregating every problem in one pass. Changes nothing.idthe full problems list— (problems are returned, not raised)
workflow_publishValidate, 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_renameSet 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_archiveArchive 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_draftPermanently 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.

ToolPurposeKey inputsReturnsRefusal codes
workflow_tile_catalogList 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_flowrefRe-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 targetthe updated draftNOT_FOUND · CONFLICT (not a draft)
workflow_referenced_byList the published workflows that reference this one. Call it before archiving: archive refuses while this list is non-empty.workflowIdthe consumer list—

Discovery & observation (6 tools)

ToolPurposeKey inputsReturns
workflow_catalogThe 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_listAll versions of one workflow, newest first.workflowIdversions with status, checksum, dates
workflow_list_allThe latest version of every workflow in the tenant.—one row per workflow
workflow_getOne version with its full graph payload. version=0 (or omitted) means the latest published version.workflowId; optional versionthe full version, including graphJson
workflow_runsThe runs launched from a workflow, newest first.workflowId; optional version filterthe run list
workflow_run_nodesPer-node status of one run — maps the run's tasks back to the authoring node ids.the run's mission idper-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), optional objective, model, provider, paramsJson, projectId, presetId (+ forceOnAllCallSites), agentBudgetJson (+ forceBudgetOnAllAgentSites).
  • Parameters bind at compile time. The values in paramsJson are bound when the graph is compiled into the new mission's plan; nothing rebinds mid-run.
  • Model resolution is explicit. model and provider are required unless tenant defaults resolve them — there is no silent model fallback.
  • Presets are the preferred lever. presetId runs this invocation with a named preset instead of a raw model; an unknown preset refuses with NOT_FOUND rather 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 pass forceOnAllCallSites.
  • Per-run agent budgets. agentBudgetJson adjusts 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 pass forceBudgetOnAllAgentSites, which pushes the stated axes onto every agent site, outranking what the step authored. A malformed override refuses with VALIDATION_ERROR before 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 with NOT_FOUND and a non-Active project with CONFLICT, 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 missionId with step, gate, and control counts. Every gate is born paused behind a pending decision.
  • Follow-ups: mission_get to watch the mission, decision_list to find pending gates, workflow_run_nodes for per-node status.

Cloning (2 tools)

ToolPurposeKey inputsReturns
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_systemClone a system template into a fresh draft your tenant owns.the template key{ id, workflowId, version, status }

System templates (2 tools)

ToolPurposeKey inputsReturns
workflow_system_listList the platform's 22 read-only gallery templates.—template summaries
workflow_system_getOne template with its full graph, so you can inspect it before cloning.workflowKeythe 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.

ToolPurposeKey inputsReturns
workflow_node_instructions_getRead a node's authored text, the winning binding (if any), and the effective text dispatch would use.the node reference; optional scopeauthored, binding, effective
workflow_node_instructions_setSet the manual instruction text at one scope.the node reference, scope, textthe updated slot
workflow_node_instructions_clearRemove the manual instruction at one scope.the node reference, scopethe 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.

ToolPurposeKey inputsReturnsStatuses
mission_run_startStart 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 groupIdthe run id + a status tokenthe 11 run-start statuses
mission_run_getOne 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 idthe run detail—
mission_run_acceptThe 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 idthe changement on successthe 7 run-accept statuses
mission_run_discardDrop an unaccepted run: marks it Rejected and deletes its branch. Nothing landed, so there is nothing to undo.the run idconfirmation—
mission_changement_stackThe mission's changements in ordinal order, each with its touched files and the prior changements it depends on.the mission idthe stack—
mission_revert_previewPreview 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 changementthe cascade—
mission_revertExecute the previewed cascade, newest first, fail-closed: a conflict aborts cleanly and names the failing member — nothing partial lands.the mission id, the changementthe 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.

TokenMeaningWhat to do
StartedThe run was created on its own branch off the mission tip, born Proposed.Watch it with mission_run_get; resolve gates via decision_respond.
FeatureDisabledWorkflows:MissionRuns:StartEnabled is off in this environment.Ask your operator to enable it — see Refusals & failure modes.
AgenticMissionUnsupportedThis mission's type can't host workflow runs.Use a standard mission, or create one with workflow_invoke.
MissionTerminalThe mission is already Completed, Failed, or Cancelled.Start the run on a live mission, or invoke a fresh one.
MissionNotPlannedThe mission hasn't reached a planned state yet.Wait for planning to finish, then retry.
ChildSpawnerDisallowedThe graph contains a node that spawns child missions — disallowed inside a mission run.Run that workflow through workflow_invoke instead.
RunAlreadyOpenStrict-sequential: an undecided run is already open on this mission.Accept or discard the open run first — or compete with the same groupId.
TipUnavailableThe mission tip couldn't be resolved.Retry; if it persists, see Refusals & failure modes.
WorkflowNotFoundNo workflow matches that workflowId and version.Check with workflow_list.
NotInvocableThat version isn't Published.Publish the draft, or pick a published version.
MaterializationFailedCompiling 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.

TokenMeaningWhat to do
AcceptedValidated and merged; exactly one changement recorded; the mission tip advanced and stays green.Read the stack with mission_changement_stack.
StaleRefusedThe mission tip moved since the run branched.Start a fresh run off the new tip — never force.
MergeConflictThe run branch no longer merges cleanly onto the tip.Discard it and start a fresh run off the current tip.
GroupAlreadyWonAnother run in this competition group was already accepted.Nothing — the group is decided; losing branches are deleted.
ValidationRefusedAcceptance 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.
NotProposedThe run isn't in Proposed — it was already accepted or discarded.Check mission_run_get.
TipUnavailableThe 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.

TokenMeaningWhat to do
ProposedBorn state: the run's changes exist on its branch and nowhere else.Inspect it, then accept or discard.
AcceptedThe merge passed physical validation; one changement landed.—
RejectedDeclined — dropped via discard, or auto-rejected when a competing sibling was accepted; the branch is deleted; nothing landed.—
SupersededReplaced by another run; no longer in play.—

Version statuses

The only legal transitions are Draft → Published → Archived.

TokenMeaningWhat to do
DraftEditable — the only state workflow_update_draft and workflow_delete_draft accept.Iterate, validate, publish.
PublishedFrozen and checksummed; runnable; never silently mutated.To change it, open a new draft version.
ArchivedTerminal; 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.

TokenMeaningWhat to do
PendingUpstream steps haven't finished; the node isn't eligible yet.Nothing — normal.
ReadyEligible, waiting to be dispatched.Nothing — normal.
DispatchedHanded to its executor, not yet reporting progress.Nothing — normal.
InProgressExecuting now.Watch via workflow_run_nodes.
CompletedFinished successfully.—
FailedFinished unsuccessfully; the roll-up carries the failure reason.See Refusals & failure modes.
CancelledStopped by the mission or an operator.—
PausedWaiting on a human decision or an event.For gates: decision_list, then decision_respond.
AwaitingGateDerived from Paused: this specific pause is a gate awaiting a decision.Resolve it with decision_respond.