Run a flow
run_flowStart a user-requested flow in the CALLER's repository.
Instructions
Start a user-requested flow in the CALLER's repository.
flow: a bare ID, ID.md, flows/ID.md, or builtin:/user:/repo:<id>. A bare ID
resolves repo:, then user:, then builtin:. request carries the user's scope,
PR/MR URL and constraints such as no-merge. repo_path defaults to the caller
workspace; an override must be an existing directory within it.
HTTP requires X-Agents-Workspace. Stdio uses AGENTS_CLIENT_REPO_ROOT, else
workspace when it lies inside the client's MCP roots, else the project
inferred from CLAUDE_PROJECT_DIR or cwd. A filesystem root, the home directory
or a system or program directory (also as the override) is refused with
workspace_unsafe, and a cwd without .git or CLAUDE.md with workspace_required.
Returns needs_execution with flow metadata, content, repo_path, workspace_id,
request and instruction. Continue executing that content using client tools.
When the flow names a persona (flow.persona), persona_activation is a protocol 2
response for it: pass current_persona and apply it as a switch before executing.
force_reload=True with current_persona returns that persona's full instruction again.
This tool only reads instructions: it does not run commands, edit files,
create a background task, sample a model or claim the workflow is complete.
Returns status=error for an invalid source or unavailable caller workspace; over
stdio a workspace error adds pid, workspace_inputs and, when the Claude desktop
app started this server, hint. Over HTTP a workspace outside the registered root
returns workspace_mismatch with both roots instead of running there.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"flow": "<flow>"
},
"name": "run_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow | Yes | Flow id, ID.md, flows/ID.md, or builtin:/user:/repo:<id>. | |
| request | No | The user's scope, PR/MR URL and constraints. | |
| repo_path | No | Optional directory within the caller workspace; defaults to the workspace. | |
| workspace | No | Absolute path of your working directory, the project this session works in. Pass it whenever you have one. It never widens this session's grant: over HTTP the workspace registered for the connection decides, and over stdio it is checked against the client's own MCP roots unless this session's root is already pinned, when it is ignored. Each tool's description says what it does with a path that grant does not cover. | |
| force_reload | No | True with current_persona to restore the flow persona's lost instructions. | |
| current_persona | No | The `persona` object of the last SUCCESS/NO_CHANGE, copied verbatim; omit or null on first activation. All 7 keys: agent, activation_id, bundle_revision (64 hex characters), scope, skills_loaded, implants_loaded, rules_loaded. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |