MCP tool reference
Every tool the server registers, with its parameters and types. The tool descriptions and parameter tables on this page are generated directly from the server source, so they cannot drift from the code.
Conventions: most tools identify their session with a session_index — the 6-character token returned by start_session. Tools in the Bootstrap group work without one. The short catalog lives in docs/api-reference.md; behavioral depth is in the architecture models linked from there.
Each registered MCP tool is listed below. Expand an entry for the full description and advanced parameters. This page is generated from the server source — do not hand-edit the tool bodies.
Bootstrap
Callable without a session_index.
discover
Entry point — call before other tools.
Full description
Call this first. Returns the server name, version, and the bootstrap steps for starting a workflow.
No session required. Use list_workflows to see what you can run.
No parameters.
list_workflows
List available workflows (id, title, version, tags).
Full description
Lists every workflow the server can run, with id, title, version, and tags.
If some workflow files cannot be loaded, you still get the working entries plus a load_errors list for the failures.
No parameters.
health_check
Server health: status, name, version, workflow count, uptime.
Full description
Quick ping to confirm the server is up. Returns status, name, version, workflow count, and uptime.
No session required.
No parameters.
Session
Create, inspect, and extend workflow sessions.
start_session
Start or resume a workflow session.
Full description
Opens a new workflow session or resumes an existing one.
Returns a session_index (six characters), basic workflow metadata, and planning_folder_path — the absolute path agents should use for session artifacts (host bind path under Docker when HOST_PROJECTS_ROOT is set; server-local path under stdio).
Pass planning_folder as any absolute path whose basename is your planning slug (for example, .../planning/2026-05-28-my-slug). Only the slug is used; the server resolves it under its own workspace. A stale or wrong path prefix is harmless.
If that slug already has session.json, the session resumes and workflow_id is ignored. Otherwise the server creates a fresh session and seeds variables from the workflow defaults.
Omit planning_folder to start a meta bootstrap session in a temp folder. Use dispatch_child later to promote it to a real planning folder.
Child workflows are started with dispatch_child, not start_session.
| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_id | string | no | Workflow id to run or dispatch (for example, work-package). |
planning_folder | string | no | Absolute path whose basename is the planning slug. The server resolves the slug under its own workspace — the directory prefix is only a hint. |
repo | string | no | Target owner/repo (or github URL). Always pass when known; written to session.json#repo. Also accepted from planning_folder under …/<owner>/<repo>/…. |
user_request | string | no | The user's free-form request that opened this session. Seeded into the variable bag as user_request, so techniques that match or classify the request read it as state instead of needing it inlined into a spawn prompt. Children inherit it via dispatch_child. |
agent_id | string | no | Label for this agent in the session trace. Default: "orchestrator" |
context_mode | "persistent" | "fresh" | no | persistent: reuse earlier deliveries when one agent keeps full context. fresh (default): always return full content. |
get_workflow_status
Session status (active/blocked/completed), current activity, completed activities, last checkpoint, and parent context if nested.
Full description
Returns whether the session is active, blocked at a checkpoint, or completed, plus the current activity and completed steps.
If the session is nested under a parent, parent context is included too.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
inspect_session
Read-only compact projection of session state (never raw session.
Full description
Read-only look at a session's stored state. Pick a view: summary (everything), identity, variables, checkpoints, activities, history, or children.
Returns a compact, purpose-built projection — never the raw session file.
Pass child_index to look one level into a child session listed under triggeredWorkflows; pass variable with view: variables to read a single value.
It never changes anything and works even while the session is paused at a checkpoint — which is often exactly when you want to look.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
view | "summary" | "identity" | "variables" | "checkpoints" | "activities" | "history" | "children" | "usage" | no | Projection: summary (default), identity, variables, checkpoints, activities (completed, skipped, and the outcome each reported), history, children, or usage (per-activity token rows with their basis and measured wall clock, delta totals, each agent's latest cumulative figure, the completed activities holding no row, and each child's cost outside those totals). Default: "summary" |
child_index | integer | no | Optional. Project triggeredWorkflows[child_index].state instead of the parent session. |
variable | string | no | Optional. With view=variables, return a single variable by name. |
agent_id | string | no | Label for this agent in the session trace. |
dispatch_child
Start a child workflow inside the current session.
Full description
Starts a child workflow inside the parent session you are already in.
Returns the child's session_index and planning_folder_path. The child's variables are seeded from the child workflow's defaults; the parent is unchanged.
Also returns workflow.initialActivity when the child workflow declares one — the activity its first next_activity should name. A parent knows its own workflow's first activity, not its child's, and get_workflow stays where a session reads its own metadata, so this carries the child's across the boundary.
The child state is stored inside the parent's session.json under triggeredWorkflows.
When the parent is a temporary meta-bootstrap session, the server first promotes it to a real planning folder on disk, then embeds the child. You can keep using the parent's original session_index.
Dispatching from a temporary parent into a folder that already holds a child of the same workflow REPLACES that child rather than continuing it, and hands back the same session_index with an empty session behind it. A persistent parent appends a second child instead. See issue 429.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
workflow_id | string | yes | Workflow id to run or dispatch (for example, work-package). |
agent_id | string | no | Label for this agent in the session trace. Default: "worker" |
planning_slug | string | no | Slug for the promoted planning folder when dispatching from a meta bootstrap session. Ignored if the parent already has a persistent folder. |
repo | string | no | Bind owner/repo onto the parent session when missing (must match if already set). session.json#repo is the source of truth. |
context_mode | "persistent" | "fresh" | no | persistent: reuse earlier deliveries when one agent keeps full context. fresh (default): always return full content. |
Workflow and activity navigation
Load workflow structure and advance through activities.
get_workflow
Orchestrator tool: load the session workflow.
Full description
Loads the workflow definition for the current session.
The response starts with the orchestrator technique, then a separator, then metadata: rules, variables, initialActivity (the first activity to run), and a short list of all activities.
Use initialActivity for your first next_activity call — this is where a session reads its own. (dispatch_child returns the *child's*, for the parent to hand across.)
Also returns planning_folder_path (host bind path under Docker when HOST_PROJECTS_ROOT is set). Treat this as the one true artifact location; do not build paths relative to your own working directory.
If some activity files failed to load, activity_load_errors lists them and those activities are omitted from the list.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
next_activity
Orchestrator tool: transition to activity_id (does not return the activity body — the worker calls get_activity).
Full description
Moves the session to a new activity. This is the orchestrator's advance call — it updates state and records the trace but does not return the activity body.
After next_activity, the worker should call get_activity to load steps, checkpoints, exits, and technique references.
For the first transition, use initialActivity from get_workflow. After that, take the exit the activity reports and read its destination from the graph in get_workflow.
Optional step_manifest and exit help the server validate what you completed. Manifest checks are advisory — mismatches produce warnings, not hard errors.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
activity_id | string | yes | Activity to move to. First call: use initialActivity from get_workflow. Later: the activity the graph binds to the exit just taken. |
exit | string | no | Name of the exit the previous activity took. |
step_manifest | object[] | no | Steps completed in the previous activity, for example [{ "step_id": "detect-review-mode", "output": "is_review_mode=false" }]. Omit if no steps ran. |
activity_manifest | object[] | no | History of completed activities with their outcomes and the exit each took. |
variables_changed | object | no | Variable assignments the completing activity produced — relay the worker's activity_complete variables_changed map verbatim. The server writes them into the session variable bag and records one variable_set history event per name, so the bag a later get_workflow_status / inspect_session returns reflects worker outputs and survives a lost agent context. Declared types are validated warn-only: a mismatch is stored as written and surfaced in _meta.validation. Omit when the activity changed nothing. |
artifacts_produced | object[] | no | Artifacts the completing activity produced: [{id, name, path?}]. Merged by id into the session declared-artifact accumulation; planning-folder reconciliation joins on id (warn-only). |
agent_id | string | no | Label for this agent in the session trace. |
context_tokens | integer | no | Your worker context window in tokens. Required so the server can size inline technique bundling. |
progress_published | boolean | no | Whether the in-progress Progress mark for this activity is committed and pushed before the worker spawns. Recorded as a progress_published event, so an activity opened without one is answerable from the session rather than only from whoever was watching the working tree at the time. Omit only where the session has no planning folder to mark. |
Nested fields
Each item in these arrays is an object with the fields below.
| In | Field | Type | Required | Description |
|---|---|---|---|---|
step_manifest[] | step_id | string | yes | Step id from the activity definition (field name is step_id, not id). |
output | string | yes | Short summary of what the step produced. Use a JSON object when the step has multiple outputs. | |
activity_manifest[] | activity_id | string | yes | Completed activity id. |
outcome | string | yes | Short outcome summary for that activity. | |
exit | string | no | Exit that activity took, if any. | |
artifacts_produced[] | id | string | yes | - |
name | string | yes | - | |
path | string | no | - |
get_activity
Load the current activity definition, including steps and transitions.
Full description
Loads the full definition for whatever activity the session is currently on. No activity_id parameter — the server reads it from session state.
You must pass context_tokens: your worker's context window size in tokens. The server uses this to decide how many step techniques to bundle inline.
Ungated techniques that fit the budget are included in the response under step_techniques — the same content you would get from get_technique for that step. Gated steps and overflow techniques still need a separate get_technique call.
If the session uses persistent context mode (or you pass bundle: "reference"), content you already received may come back as short unchanged markers instead of full text. Pass bundle: "full" to force full delivery.
_meta.batch reports where your context stands against its batch bound: how many activities it has taken, the cap, what it has been delivered, the budget, and may_continue. On may_continue: false, finish this activity and report it — asking for another is refused with the payload undelivered, and the orchestrator dispatches a fresh worker under a new agent_id.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
context_tokens | integer | yes | Your worker context window in tokens. Required so the server can size inline technique bundling. |
agent_id | string | no | Label for this agent in the session trace. |
bundle | "reference" | "full" | no | reference: return unchanged markers for content already delivered. full: always return complete text. |
Checkpoint flow
Yield to the orchestrator, present decisions to the user, and resume.
yield_checkpoint
Worker tool: mark a checkpoint active and yield to the orchestrator (emit <checkpoint_yield> with the returned session_index).
Full description
Call when a checkpoint step tells you to stop and hand control to the orchestrator.
Records the checkpoint as active and returns the session_index for a <checkpoint_yield> block in your output.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
checkpoint_id | string | yes | Id of the checkpoint step you are yielding. |
message | string | no | Only for a decision the activity does not declare: the question put to the user. Forbidden on a declared checkpoint, whose definition owns the wording. |
options | object[] | no | Only for a decision the activity does not declare: at least two answers. The decision is recorded; an option here sets no variable, so a value the run must read belongs on a declared checkpoint. |
Nested fields
Each item in these arrays is an object with the fields below.
| In | Field | Type | Required | Description |
|---|---|---|---|---|
options[] | id | string | yes | Option id the orchestrator answers with. |
label | string | yes | Option text shown to the user. | |
description | string | no | What choosing this option means. |
resume_checkpoint
Worker tool: continue after the orchestrator resolves a checkpoint.
Full description
Call after the orchestrator resolves a checkpoint and resumes you.
Verifies the checkpoint is cleared and returns any variable updates to apply before continuing the activity.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
present_checkpoint
Load the active checkpoint (message, options, effects, auto-advance) for presenting to the user.
Full description
Loads the active checkpoint's message, options, and effects so you can show it to the user.
Reads from state.activeCheckpoint — no separate checkpoint handle is needed.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
respond_checkpoint
Clear the active-checkpoint gate.
Full description
Submits the user's checkpoint decision and clears the active checkpoint.
Present the checkpoint to the user and wait for input before calling this.
Provide exactly one of: option_id (user picked an option), auto_advance (timer elapsed on a checkpoint with a default), or condition_not_met (conditional checkpoint whose condition was false).
Variable effects from the chosen option are applied; type mismatches produce warnings in _meta.validation but do not block the response.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
option_id | string | no | Option the user selected. Must match one of the checkpoint's defined options. |
auto_advance | boolean | no | Set true to use the checkpoint's default option after its timer elapses. |
condition_not_met | boolean | no | Set true to dismiss a conditional checkpoint whose condition evaluated to false. |
Techniques and resources
Fetch technique definitions and lazy-loaded reference material.
get_technique
Load one fully composed technique (step-bound when step_id is set; otherwise the activity's or workflow's first).
Full description
Fetches one technique for the current workflow or activity.
Before any activity is active, returns the workflow's first technique. During an activity, use step_id to fetch a specific step's technique, or omit step_id for the activity's first technique.
The response is fully composed: inherited inputs/outputs and merged rules from ancestor techniques, plus binding annotations when fetched via a step.
Techniques load one at a time. In persistent context mode, an identical refetch may return a short unchanged marker; pass full: true to get the full payload again.
Every fetch is recorded for trace and advisory manifest checks on the next next_activity call.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
agent_id | string | no | Label for this agent in the session trace. |
step_id | string | no | Step within the current activity. Omit to get the first technique for the activity or workflow. |
activity_id | string | no | Activity to move to. First call: use initialActivity from get_workflow. Later: the activity the graph binds to the exit just taken. |
bundle | "reference" | "full" | no | reference: return unchanged markers for content already delivered. full: always return complete text. |
full | boolean | no | Force full content even when persistent mode would return an unchanged marker (get_technique or get_resource). |
get_resource
Load a resource by id (optional #section).
Full description
Loads reference material by id — templates, guides, or other markdown resources linked from techniques.
Bare ids (review-mode) resolve within the current workflow. Prefixed ids (meta/bootstrap-protocol) load from another workflow.
Add #section to fetch one heading slice instead of the whole file.
In persistent context mode, an identical refetch of the same resource_id (including any #section) may return a short unchanged marker; pass full: true to get the full body again.
Each fetch is logged for observability only (including when the answer is an unchanged marker); nothing validates that you called it.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
agent_id | string | no | Label for this agent in the session trace. |
resource_id | string | yes | Resource slug, optionally workflow-prefixed (meta/bootstrap-protocol), optionally with #section anchor. |
bundle | "reference" | "full" | no | reference: return unchanged markers for content already delivered. full: always return complete text. |
full | boolean | no | Force full content even when persistent mode would return an unchanged marker (get_technique or get_resource). |
Trace
Execution history and per-dispatch cost accounting.
get_trace
Retrieve the session execution trace.
Full description
Returns the tool-call history for debugging or audit.
Pass accumulated trace_tokens from next_activity responses to reconstruct a specific segment. Omit them to read the live in-memory trace for the session.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
trace_tokens | string[] | no | Tokens collected from next_activity _meta.trace_token responses. |
agent_id | string | no | Label for this agent in the session trace. |
record_usage
Orchestrator tool: record harness-reported token usage for ONE completed ACTIVITY (DELTA since the last figure for that dispatch).
Full description
Orchestrator tool: record harness-reported token usage for ONE completed ACTIVITY (DELTA since the last figure for that dispatch). Call at every activity boundary — the first worker, a continue, a fresh worker after a timeout, a resume after a checkpoint yield, an out-of-band dispatch, and the terminal activity; a dispatch carrying a run of activities records one call per activity it covers. Optional agent_id attributes the row to a worker context.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_index | string | yes | Six-character token from start_session. Use the same value for every call in this session. |
activity | string | yes | Activity this figure is attributed to, whether or not the session is still on it. One call per activity a dispatch covers. |
usage | object | yes | Harness-reported token figure for this ONE activity, as reported. Omit the call entirely when the harness surfaced nothing rather than passing zeros — the worker cannot self-measure, so absence must stay distinguishable from a measured zero. |
basis | "delta" | "cumulative" | yes | What the figure counts. delta is this activity's own spend and sums with its siblings. cumulative is a running total for this agent context, which several harnesses report — those are carried as the latest figure per agent, since summing them counts every earlier activity again. Read the harness output rather than assuming: a cumulative figure passed as a delta is what makes a total wrong in a direction nothing reveals. |
agent_id | string | no | Label for this agent in the session trace. |