Skip to main content
Glama

save_workspace

Write the open workflow to a file, preserving UI layout or converting to API format. Capture unsaved work and break up large graphs for later analysis.

Instructions

Write the workflow open in the browser to a file.

This is how to get at a graph too large to fit in one answer: the reply is a path and a few numbers, and the file can then be read in slices or searched like any other. It is also how an unsaved canvas becomes something that survives the tab being closed.

Args: name: file name, with or without .json. format: "ui" writes exactly what ComfyUI's own Save writes - positions, groups, titles, collapsed state - into the export directory, and it can be opened in ComfyUI again. "api" writes the API-format prompt into the workflows directory, where run_workflow and describe_workflow find it. The two are not interchangeable: UI format keeps the layout and cannot be run, API format is runnable and has no layout at all. scope: "root" for the whole workflow, "active" for the subgraph on screen. overwrite: replace the file if it already exists. client_id: which tab to ask; defaults to the most recently focused one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
scopeNoroot
formatNoui
client_idNo
overwriteNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden. It explains the behavioral differences between 'ui' and 'api' formats, overwrite semantics, scope options, and the nature of the reply ('a path and a few numbers'). It does not mention permissions or side effects, but for a save operation this is adequate.

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 appropriately sized and front-loaded. The opening sentence states the core action, followed by rationale, then a structured Args list. Every sentence contributes useful information; there is no redundancy or filler.

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 tool's complexity (5 parameters, no annotations), the description is remarkably complete. It covers purpose, use cases, format distinctions, scope, overwrite, and even the response shape. It also relates to sibling tools (run_workflow, describe_workflow) to ground its context.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate. It does so thoroughly with an Args section explaining each parameter: 'name' (file name), 'format' (ui vs api with detailed consequences), 'scope' (root vs active), 'overwrite' (replace file), and 'client_id' (which tab to ask). This adds meaning far beyond the schema's bare property names.

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 opens with a specific verb and resource: 'Write the workflow open in the browser to a file.' It clearly distinguishes from siblings like load_workspace and open_workspace. The additional context about handling large graphs further clarifies the tool's unique role.

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 provides clear use cases ('This is how to get at a graph too large to fit in one answer' and 'how an unsaved canvas becomes something that survives the tab being closed'). It also explains format-specific destinations, implicitly guiding when to use 'ui' vs 'api' in relation to run_workflow and describe_workflow. No explicit 'when not to use' is given, but context is strong.

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/pytraveler/local-comfyui-mcp'

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