Skip to main content
Glama

arrange_workspace

Automatically rearranges ComfyUI workflow nodes into a clean left-to-right flow based on data dependencies. Untangle cluttered canvases and improve readability.

Instructions

Lay the workflow out left to right, in the order the data flows through it.

Each node is placed one column past everything feeding it, and the nodes in a column are ordered to face what they are wired to, so links run forwards and cross as little as possible. The block keeps the top-left corner it already had, so it lands where the author left it rather than at the origin.

Reaches for the whole graph by default, which is the blunt instrument: it will move everything, and a group whose members end up far apart becomes a large box around them. Prefer only with one group's nodes at a time - that leaves the rest of the canvas untouched and keeps each block inside its own group.

Args: only: node ids to arrange, leaving every other node where it is. Links to nodes outside the list are ignored, since they cannot place anything. spacing_x: gap between columns, past the widest node in the left one. spacing_y: gap between nodes stacked in one column. origin: [x, y] for the top-left of the result. Defaults to the top-left of what is being arranged, so nothing wanders off. apply: write the positions. False computes and reports them without touching the canvas - the same dict can then be passed to set_workspace_layout. scope: "root" for the top level, "active" for the subgraph on screen. Not "all": a subgraph is a canvas of its own with its own coordinates, so there is no one layout that covers several. Use navigate_workspace to go in and arrange with "active". client_id: which tab to arrange; defaults to the most recently focused one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
onlyNo
applyNo
scopeNoroot
originNo
client_idNo
spacing_xNo
spacing_yNo

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, the description carries full burden and succeeds: it explains node placement logic, ordering to face wiring, preservation of top-left corner, default scope behavior, and the meaning of `apply` false. It also clarifies why `scope: 'all'` is invalid.

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 well-structured: a one-sentence purpose, a behavioral paragraph, and an Args list. Each sentence adds unique value, and the front-loaded purpose makes it immediately scannable.

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?

The description is complete for a tool with 7 parameters and no annotations: it covers parameter meanings, defaults, scope limitations, and relation to sibling tools. An output schema exists, so return-value details are not needed.

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?

The schema has 0% description coverage, but the description's Args section explains all 7 parameters with concrete semantics, including defaults and edge cases like `only` ignoring outside links and `origin` defaulting to the existing top-left.

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 clear verb and resource: 'Lay the workflow out left to right, in the order the data flows through it.' It distinguishes from sibling tools like set_workspace_layout by noting the computed dict can be passed there, and from align_workspace by focusing on flow-based layout rather than alignment.

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 advises preferring `only` with one group's nodes at a time over the whole-graph default, calling the latter a 'blunt instrument.' It also directs users to `navigate_workspace` for arranging within subgraphs and mentions `set_workspace_layout` as the application path when `apply` is false.

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