Skip to main content
Glama

align_nodes

Align Figma nodes by left, horizontal-center, right, top, vertical-center, or bottom edges to selection bounds, a parent frame, or another node; the target node stays fixed.

Instructions

Align nodes' edges or centers: left|hcenter|right|top|vcenter|bottom. to: 'selection' (default — the union bounds of the given nodes), 'parent' (each node's parent frame), or a node id (that node's bounds; it is not moved).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "nodeIds": "<nodeIds>",
      "align": "<align>"
    },
    "name": "align_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo'selection' (default), 'parent', or a node id
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
alignYes
nodeIdsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose a genuinely non-obvious trait: when `to` is a node id, that reference node 'is not moved'. It also defines the default target as the union bounds of the given nodes. It stops short of covering behavior for mixed-parent node sets, error cases, or what the call returns.

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?

Two sentences, both dense with information, front-loading the action and immediately defining the `to` parameter's modes. The nested parentheticals are compact but make the second sentence slightly harder to scan on first read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter mutation with no annotations and no output schema, the description covers the operation (what gets aligned) and the target semantics (what it aligns against) well enough to call the tool correctly. Missing pieces – return value, behavior with nodes from different parents, and failure modes – are moderate rather than blocking gaps.

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 50% (`to` and `file` are documented, `align` and `nodeIds` are not), and the description compensates well: it spells out the enum values for `align` and elaborates the three `to` modes beyond the schema's one-liner, including the side-effect that the target node stays put. It leaves `file` and `nodeIds` semantics to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Align nodes') and enumerates the exact alignment modes (left|hcenter|right|top|vcenter|bottom), so the operation is unambiguous. It doesn't explicitly contrast itself with siblings like align_to_grid or distribute_nodes, which keeps it at a 4 rather than a 5.

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

Usage Guidelines3/5

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

Guidance is implicit: the description explains the three `to` modes and flags the default ('selection' → union bounds), which helps an agent pick a mode. It never states when to choose this tool over align_to_grid or distribute_nodes, and gives no preconditions (e.g., whether nodes must share a parent).

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