workflow_builder
Generate a new workflow or refine the current canvas into an unsaved validated proposal. It defines orchestrator instructions, nodes, connections, and layout for execution.
Instructions
Generate a workflow, or refine the current canvas into an unsaved validated proposal.
Orchestrator instructions belong in orchestrator.instructions; Start/End are structural. Optional on_demand_nodes are a separate ordered list with globally unique local id, title, required nonempty instructions, optional call_condition (When to call guidance), agent, freedom, network, session_mode agent_decides|fresh|resume and execution_mode. They have no position, role or connections. max_on_demand_calls defaults to 5 (1–50) per routing/question checkpoint; no per-node or per-run call cap exists.
Write prompt in plain prose: preserve spaces and word boundaries rather than concatenating words to save tokens. The caller's prompt is retained unchanged before builder input assembly.
Keep node and connection instructions concise and task-specific. HarflowMCP owns runtime retries, budget enforcement, configured fallback dispatch and user interaction; use existing configuration fields for limits and fallback candidates, and orchestrator needs_input for clarification or approval. End means intentional workflow termination, not waiting for user input. Preserve legitimate task branches and revision loops.
Layout uses top-left logical point coordinates with x/y >= 0 and a 10-point dot grid.
Agent nodes are 200 x 92 points (reserve 20 x 10 grid cells); Start/End are 72 x 72
(reserve 8 x 8 cells). Leave at least 40 points (4 cells) between node edges and avoid
overlaps. Arrange forward steps left to right and parallel branches on separate rows.
Use routing_mode="explicit". Ordinary outgoing paths are exclusive alternatives.
Parallel execution requires paired parallel_start/parallel_end structural nodes with
a shared parallel_group_id; every branch must reach its matching end. Parallel start
defaults to branch_selection: "all". With branch_selection: "orchestrator", the
orchestrator selects applicable issued branch continuations, assigns each selected entry
through branch_assignments, and records a non-empty selection_reason explaining
selections and exclusions before dispatch. Optional selection_guidance advises that
choice. Selected branches may contain multiple steps and properly nested groups;
convergence uses the frozen selected membership, including singleton selections.
Preserve existing node positions exactly unless the user explicitly asks to move or rearrange them.
Preserve any supplied Run workflow nodes exactly (workflow_ref, orchestrator_mode,
child_session_policy, attempts, timeout, optional); never author new Run workflow references.
Child session policy is agent_decides (default), fresh, or resume, and is inactive in
Current mode. Resume reuses only the latest completed compatible invocation in the
immediate parent run, with fresh workflow state; explicit Resume never falls back Fresh.
The canvas expands automatically; there is no fixed right or bottom boundary.
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": {
"name": "<name>",
"prompt": "<prompt>"
},
"name": "workflow_builder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| agent | No | ||
| prompt | Yes | ||
| source | No | ||
| fallbacks | No | ||
| repo_path | No | ||
| definition | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||