Skip to main content
Glama

set_workspace_values

Set widget values, node properties, and on-screen labels in an open ComfyUI workflow, with validation and single-step undo. Pass multiple changes at once to edit the live canvas exactly as typed.

Instructions

Set widget values, node properties and on-screen labels in the open workflow.

This edits the live canvas, exactly as if the values had been typed in. The change lands on the frontend's undo stack as a single step, so one Ctrl+Z in the browser takes back the whole call - which is the reason to pass several values at once rather than one per call, and why properties live here rather than in a tool of their own.

Nothing is written unless every key validates, so a rejected call leaves the graph as it was. Numeric ranges are enforced; a combo value outside the listed options is reported as a note and written anyway, because a node's option list is not a whitelist - ComfyUI decides.

Args: values: {"<node_id>.<widget>": value}, e.g. {"37.megapixels": 1.5}. Node ids and widget names come from get_workspace_graph. properties: {"<node_id>.<property>": value} - the second, separate set of settings a node carries, the ones ComfyUI edits through the Properties Panel on its context menu. Some nodes keep their whole configuration there and their widget values mean nothing without it. A separate argument because the two namespaces can collide: one node here has a delimiter in both. Written through the node's own setProperty, so a pack that rebuilds its widgets in response gets the chance to. labels: {"<node_id>": {"title": ..., "inputs": {...}, "outputs": {...}, "widgets": {...}}} - the text drawn on a node rather than in it. This is what makes a workflow readable in another language: a graph written in Chinese keeps its headings in node titles, slot labels and widget rows, and no widget value reaches any of them. Addressed by the stable name from get_workspace_graph, and null or "" clears an override so the name shows through again - which is how a translation is taken back off. widgets is separate from inputs because a converted widget has both, and only the widget's own label changes the row on screen - but that one is not saved with the workflow and lasts until the page reloads, which the change log says each time. Keyed by node id alone, because a node has one title and several sets of names, and "1.title" would collide with a widget called title. Do not try to write localized_name: that one is ComfyUI's own translation for the current locale and is regenerated on load. scope: "root" for the whole workflow, "active" for the subgraph on screen. client_id: which tab to edit; defaults to the most recently focused one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoroot
labelsNo
valuesNo
client_idNo
propertiesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden and does so exceptionally. It discloses the undo-stack single-step behavior, all-or-nothing validation, numeric range enforcement, the note-and-write behavior for out-of-list combo values, label persistence (not saved with workflow), the localized_name caveat, and setProperty mechanics. This is far beyond typical transparency.

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 long but front-loaded with a one-sentence summary and a clean Args section. Most sentences add valuable behavioral or usage detail, but a few asides (e.g., the Chinese-language example) are somewhat tangential and could be trimmed without losing core information. Overall it is well-structured and dense, but not perfectly concise.

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?

This is a complex tool with 5 parameters, and the description covers all of them thoroughly, including side effects, validation, undo behavior, persistence, and edge cases. It references get_workspace_graph for IDs. Since an output schema exists, not explaining return values is acceptable. This is a complete and self-sufficient description for the tool's complexity.

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 description coverage is 0%, and the description fully compensates. For every parameter it gives detailed semantics: values format and example, properties explanation with collision warning, labels structure with override-clearing and persistence caveats, scope meaning, and client_id default. It even explains why labels are keyed by node id alone—far more than the schema provides.

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+resource+scope: 'Set widget values, node properties and on-screen labels in the open workflow.' It clearly distinguishes from sibling tools like set_workspace_layout (layout), align_workspace (alignment), and set_workspace_node_modes (modes) by naming exactly what is being changed and where.

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 context: the tool edits the live canvas exactly as if typed, and explicitly explains why to pass several values at once and why properties live here rather than a separate tool. It also references get_workspace_graph for node ids and widget names. However, it does not explicitly state when NOT to use this tool versus alternatives, so it stops short of a full when/when-not specification.

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