Skip to main content
Glama

save_workflow

Transforms an API workflow graph into a human-editable format for ComfyUI. Verifies integrity by round-trip conversion, then optionally saves to the workflows directory.

Instructions

Convert an API graph to UI/litegraph format so a human can open and edit it.

The loop builds API format because that's what /prompt runs — it is NOT the file you drag onto the ComfyUI canvas. Call this when the user asks for the editable workflow.

The result is VERIFIED by converting it back to API format and diffing against what you passed in; any mismatch is reported. widgets_values is positional and a silent off-by-one shifts parameters — a plausible-but-wrong file is worse than none, so if the round-trip doesn't match, fix it before shipping it.

With save=True and a name, it's written to ComfyUI's workflows dir so it shows up in the UI's workflow list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
saveNo
workflowYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, so description carries full burden. It discloses verification via round-trip diffing, warns about silent off-by-one in widgets_values, and explains that mismatches are reported and should be fixed. Also describes save behavior comprehensively.

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?

The description is concise (about 90 words) yet thorough. Each sentence adds value, front-loading the primary purpose and then covering verification, warnings, and save behavior without redundancy.

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?

Given the complexity and the presence of an output schema, the description covers all necessary behavioral details: purpose, when to call, verification mechanism, edge case warnings, and persistence. No gaps remain.

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%, but the description adds meaning: workflow is the API graph, name and save control persisting the file. It explains the role of each parameter beyond the schema, compensating for the lack of schema descriptions.

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 clearly states the tool's purpose: 'Convert an API graph to UI/litegraph format so a human can open and edit it.' It specifies the verb 'convert' and resource, and distinguishes from sibling tools by noting that the loop builds API format and this tool is for the editable format.

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

Usage Guidelines5/5

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

The description explicitly says 'Call this when the user asks for the editable workflow.' It also implies when not to use it (the loop builds API format) and explains the save behavior. Additionally, it provides guidance on handling widgets_values positional off-by-one errors.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/huikku/comfyui-loop-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server