Run a flow
run_flowStart a user-requested flow in the caller's repository, resolve its source, and return the workflow instructions and metadata for client-side execution.
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.
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.
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: one server can serve several sessions. | |
| 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 |