Skip to main content
Glama

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

NameRequiredDescriptionDefault
nameYes
definitionYes
expected_revisionNo
expected_workflow_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.14

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does substantial work: it discloses concurrency guarding via expected_revision, that context_delivery is silently normalized to optimized_v1 (including legacy values), that historical runs keep pinned policies, and that missing references, cycles, and >4 levels of nesting are rejected before any write. The only real gap is that the permission-envelope rule for agent vs human callers is buried at the end rather than surfaced as a precondition.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The prose is a single dense block of run-on sentences packing dozens of unrelated rules (subworkflow session policies, on-demand call caps, Start/End node settings, legacy prompt migration). Several details are schema-level documentation smuggled into the description, and critical preconditions such as the permission envelope are placed last. It is not front-loaded and much of it does not earn its place here.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is complex (4 params, nested definition, dependency-tree resolution) with no annotations, but an output schema exists so return values need not be explained. The description covers validation rules, refusals, normalization side effects, and subworkflow semantics, which is close to complete for a save operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and `definition` is a free-form nested object, so the description must compensate, and it does: expected_revision is tied to concurrent-edit protection, expected_workflow_id to identity checks against a deleted or replaced same-name definition, and definition is scoped to 'only the authored graph payload' because the store supplies the envelope. The `name` parameter and the nested definition field shapes are described narratively rather than mapped to keys, so it is not a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause 'Validate and save an explicit workflow' gives a specific verb pair and resource, and 'explicit' distinguishes it from builder/draft flows. It never names a sibling (e.g. apply_workflow_draft or start_workflow) to draw the boundary explicitly, so an agent must infer it from the 'saved persistence' framing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the agent learns it must set routing_mode="explicit" and supply only the authored graph payload, and that unavailable sources 'refuse mutation'. There is no explicit 'use this instead of X when Y' guidance against the many workflow siblings in the catalog.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.