save_workflow
Validates and persists an authored workflow while checking expected revision and workflow identity to prevent concurrent-edit conflicts and reject missing, cyclic, or invalid references before saving.
Instructions
Validate and save an explicit workflow; expected_revision protects concurrent edits.
The store creates persistence envelopes; supply only the authored graph payload. Incompatible or unavailable saved sources refuse mutation and complete-store indexing. expected_workflow_id optionally checks the loaded stable identity, rejecting a deleted or replaced same-name definition even if its revision matches. Every save normalizes context_delivery to optimized_v1, including omitted or legacy values. Historical runs retain their pinned delivery policy. Bounded delivery uses session-bound acknowledgements and assigned evidence retrieval, with a 64 KiB target that never silently cuts required constraints. orchestrator.instructions holds the workflow purpose; Start and End have no settings. on_demand_nodes is separate from connected nodes, with id/title, required instructions, optional call_condition (When to call guidance), agent/fallbacks, freedom/network, session_mode agent_decides|fresh|resume and execution_mode headless|prefer_subagent. Standalone IDs are unique across both lists; connections cannot reference them. max_on_demand_calls defaults to 5, range 1–50, per routing/question checkpoint; no per-node or per-run call cap exists. Legacy Start prompt migrates on saved reads. Set routing_mode="explicit". Ordinary nodes choose exactly one outgoing path. Parallel execution uses paired parallel_start/parallel_end nodes with shared parallel_group_id. Every branch reaches its matching end; nesting is supported. A Run workflow node (type "workflow") references a saved workflow by workflow_ref.workflow_id with orchestrator_mode child or current. Child mode supports child_session_policy agent_decides (default), fresh, or resume. Resume inherits only the latest completed compatible child conversation in this immediate parent run, with fresh workflow state; an unavailable explicit Resume fails closed. Current mode retains its owner. The whole dependency tree is resolved and pinned at save, so missing references, cycles (reported as A > B > C > A) and nesting beyond four levels are refused before anything is written. Agent callers may save only access and network settings within their recorded capability envelope, checked over the resolved tree; verified human callers can author workflow permissions.
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>",
"definition": "<definition>"
},
"name": "save_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| definition | Yes | ||
| expected_revision | No | ||
| expected_workflow_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||