Skip to main content
Glama

save_workflow

Saves a ComfyUI workflow in UI format with layout, groups, and notes to the workflow browser and session directory. Validates before saving and prevents overwrites unless explicitly allowed.

Instructions

Save the workflow (UI format, with layout/groups/notes) into ComfyUI's workflow browser + the session dir. Organize a graph you built first (not a hand-arranged one). REFUSES to save with validation errors unless allow_invalid=True. Never overwrites by default: a taken name saves as ' (draftsman)' (result.renamed_from says so); overwrite=True replaces deliberately.

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": {
      "workflow_id": "<workflow_id>",
      "name": "<name>"
    },
    "name": "save_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
overwriteNo
workflow_idYes
allow_invalidNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.15.1
    • removedInput schema / properties / allow_invalid / title
      Removed value: -"Allow Invalid"
    • removedInput schema / properties / name / title
      Removed value: -"Name"
    • removedInput schema / properties / overwrite / title
      Removed value: -"Overwrite"
    • removedInput schema / properties / workflow_id / title
      Removed value: -"Workflow Id"
    • removedInput schema / title
      Removed value: -"save_workflowArguments"
  2. First observedv0.2.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, openWorldHint=true. The description goes well beyond: it refuses to save on validation errors unless allow_invalid=True, never overwrites by default (renaming to '<name> (draftsman)' and reporting result.renamed_from), and overwrite=True replaces deliberately. That is exactly the mutation-safety context annotations cannot convey.

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?

Front-loaded with the core action and destination, then escalates to the behavioral rules. Dense but each clause carries information; the parentheticals are informative rather than filler.

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?

Covers the save target, the validation refusal, and the rename/overwrite policy, and an output schema exists so return values need no explanation. The identifier semantics of workflow_id and name are the remaining gap for a 4-parameter mutation tool.

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

Parameters3/5

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

Schema coverage is 0%, so the description carries the burden. It richly explains overwrite and allow_invalid semantics, but says nothing about what workflow_id or name refer to (an ID from create_workflow? a display name?). Two of four parameters remain undocumented, so it only partially compensates.

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 specific verb and resource ('Save the workflow') plus the exact artifact written ('UI format, with layout/groups/notes') and both destinations (workflow browser + session dir). This distinguishes it from export_workflow_json and save_output without opening either 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 a clear precondition: 'Organize a graph you built first (not a hand-arranged one)', which routes the agent to organize_workflow before saving. It does not name organize_workflow explicitly or contrast against export_workflow_json, so it falls short of a 5.

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