Skip to main content
Glama

Update workflow

update_workflow
Destructive

Overwrite a workflow's saved draft with complete name, node, and edge lists. Uses updatedAt to detect concurrent edits, returning a conflict without changes so you can re-read and retry; deployed versions stay untouched.

Instructions

Replace a workflow's saved draft: any of name, nodes and edges you pass overwrite the stored ones whole (send the complete node and edge lists, not a patch). Requires the updatedAt from your last get_workflow or create_workflow; if someone edited it since, this returns conflict and changes nothing, so re-read and retry. Does not touch what is deployed. Returns the saved workflow with its new updatedAt.

Input Schema

NameRequiredDescriptionDefault
nameNoNew name. Omit to keep it.
edgesNoThe complete new edge list. Omit to keep the current edges.
nodesNoThe complete new node list. Omit to keep the current nodes.
updatedAtYesThe workflow's `updatedAt` exactly as last returned to you.
workflowIdYesThe workflow's id, from list_workflows or create_workflow.

Output Schema

NameRequiredDescriptionDefault
idYes
nameYes
edgesYes
nodesYes
statusYes
ownerIdYes
settingsYes
createdAtYes
updatedAtYes
authoredViaNo
authoredViaClientNo
deployedWorkerUrlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, idempotentHint=false) by disclosing the replace-whole semantics, that omitted fields are preserved, the optimistic-concurrency conflict behavior that leaves state unchanged, and that deployment state is untouched. The new `updatedAt` in the response is also disclosed.

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

Conciseness5/5

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

Three dense sentences, each carrying distinct information: replace semantics, concurrency contract, and blast radius. Front-loaded with the highest-risk fact (whole overwrite) before the procedural details.

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 destructive mutation with an output schema, everything an agent needs is present: required inputs, the concurrency protocol, failure handling, and the deployment boundary. Return values are covered by the output schema and only briefly restated.

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 already 100%, but the description adds critical semantics the schema lacks: passing nodes or edges is a full replacement, not a patch, so the complete lists must be sent. It also frames `updatedAt` as a concurrency token rather than a mere timestamp, though it adds nothing about the per-node/per-edge fields.

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?

States a precise verb and resource ('Replace a workflow's saved draft') and immediately bounds the scope with 'Does not touch what is deployed', which cleanly separates it from deploy_workflow. An agent knows exactly what state this mutates 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?

Gives concrete when-to-use mechanics: it requires the `updatedAt` from a prior get_workflow or create_workflow, and prescribes the recovery path (re-read and retry) when a `conflict` is returned. It stops short of naming siblings explicitly, e.g. whether validate_workflow should be run first or when to prefer rollback_workflow.

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