Skip to main content
Glama

set_workspace_links

Rewire node connections in a ComfyUI workflow by connecting outputs to inputs and disconnecting existing input links, with type checking and atomic undo support.

Instructions

Wire and unwire nodes in the workflow open in the browser.

Both lists are applied in one undo step, disconnects first, so moving a link from one input to another is a single Ctrl+Z rather than a half-wired graph between two calls.

An input holds one link, so connecting to a taken input replaces what was there - the response says what under replaced. Type compatibility is checked before anything is written: litegraph refuses a mismatched connection by doing nothing at all, which would otherwise leave a batch half-applied in silence.

Args: connect: [{"from": "<node_id>.<output>", "to": "<node_id>.<input>"}]. Slots may be named ("8.IMAGE", "9.images") or given by index ("8.0"). disconnect: inputs to clear, ["<node_id>.<input>"]. Only inputs - an output feeds many links, so "which one" would be ambiguous; clear the input end instead. 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
connectNo
client_idNo
disconnectNo

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 fully discloses critical behavioral traits: the atomic undo step, disconnect-first ordering, input replacement behavior, type compatibility checks that silently do nothing on mismatch, and the meaning of scope and client_id. This goes well beyond basic expectations and is highly transparent.

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 detailed for a complex tool, with each paragraph serving a distinct purpose. It is front-loaded with the main action, then explains behavior, parameter formats, and edge cases. No redundant or filler content; every sentence adds value.

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 and lack of annotations, the description covers the operation, atomicity, failure behavior, and parameter nuances comprehensively. The presence of an output schema makes it unnecessary to detail return values, and the description is complete for accurate invocation.

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%, so the description must compensate, and it does thoroughly. Connect format is explained with examples ('8.IMAGE', '8.0'), disconnect is clarified as input-only with reasoning, scope is defined, and client_id default is stated. This fully covers all four parameters with added semantic clarity.

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 'Wire and unwire nodes in the workflow open in the browser,' which clearly identifies the specific action (wiring/unwiring) and resource (workflow nodes). This distinguishes it from sibling tools like set_workspace_values or set_workspace_groups, which target different aspects of the workspace.

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?

The description provides clear context on when to use the tool (for wiring/unwiring nodes) and explains the scope parameter (root vs active), but it does not explicitly name alternatives or state when not to use it. The context is strong, but the lack of explicit exclusions prevents a 5.

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