Skip to main content
Glama

Update Workflow

workflow.update
Destructive

Edit a workflow's draft: rename it, replace its trigger, add, change or remove steps (branches included), or revert: true to discard the draft. Read it with workflow.read first and name nodes by their ref; never guess one. New steps are Steps workflow steps, and {{steps.<ref>.<path>}} may name an existing node's ref or a new step's ref. If the action fails: update: [{ref, onError}] sets stop, continue (skip failed items) or fallback_path (error branch) on integration_action, agent, transcribe and run_workflow steps; then add: [{after: ref, port: "error", steps}] puts steps on the error branch, in the same call or later (a step added in this call gets onError in a later call, by the ref workflow.read shows), and failed items reach them with the reason in {{ $input.error }}. Leaving fallback_path removes the steps only the error branch led to. On a workflow that is on, the change goes live only after workflow.publish.

Input Schema

NameRequiredDescriptionDefault
addNoSteps inserted between `after` and what followed it
nameNo
removeNoRefs to remove; an if or switch takes the steps under its branches along
revertNoDiscard the draft and go back to the published version
updateNo
triggerNoA Steps trigger; replaces the trigger's type and config and keeps what follows it
workflowIdYes
descriptionNo

Output Schema

NameRequiredDescriptionDefault
nameYes
noteNo
addedYesNames of the steps added
removedYes
updatedYes
isActiveYes
revertedNo
workflowIdYes
triggerChangedYes
hasDraftChangesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / add / items / properties / port / description
      Previous value: -"output (default), an if's true/false, or a switch's case port or default"New value: +"output (default); an if's true/false; a switch's case port or default; a classify agent's label_<id> or other; `error` for the error branch of a step whose onError is fallback_path"
    • addedInput schema / properties / update / items / properties / onError
      Added value: +{
      +  "description": "If the action fails: stop (the default), continue (skip failed items) or fallback_path (error branch: failed items go on port `error` with the reason in {{ $input.error }}). Only integration_action, agent, transcribe and run_workflow steps have it",
      +  "enum": [
      +    "stop",
      +    "continue",
      +    "fallback_path"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the destructive annotation, the description explains that revert discards the draft, that changes to an active workflow only go live after workflow.publish, and that removing fallback_path removes error-branch-only steps. It also documents error-branch behavior and how failed items reach error steps, which is substantial behavioral context.

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

Conciseness4/5

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

The description is front-loaded with the core edit operations and then moves into prerequisites and error-branch details. It is dense and somewhat run-on, but the information is relevant and organized around the workflow-editing task.

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

Completeness5/5

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

For a complex destructive mutation tool with nested parameters and an output schema, the description covers the draft/publish lifecycle, ref-based node addressing, revert behavior, and error-branch mechanics. It gives an agent enough context to invoke the tool correctly without needing to infer critical behavior.

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?

With only 50% schema description coverage, the description adds meaningful semantics for add, update, remove, revert, trigger, refs, onError, and error-branch ports. It does not explain every field, such as the top-level description parameter, but it compensates well for the schema gaps.

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

Purpose5/5

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

The description states a specific verb and resource: editing a workflow's draft, with concrete operations such as rename, replace trigger, add/change/remove steps, and revert. It also distinguishes this from workflow.read and workflow.publish, so an agent can identify the tool without opening the schema.

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

Usage Guidelines4/5

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

It gives clear usage context: read the workflow first with workflow.read, name nodes by their ref, and publish afterward if the workflow is on. It does not explicitly compare against siblings like workflow.delete, workflow.restore, or workflow.toggle, but the draft-editing scope is clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources