Skip to main content
Glama

group_nodes

Wrap sibling nodes that share a parent in a group or transparent non-clipping frame sized to their bounds, preserving absolute positions and z-order and returning the new container with its children.

Instructions

Wrap nodes that share the same parent in a group (or, with asFrame, a transparent non-clipping frame sized to their bounds). Absolute positions and z-order are preserved. Returns the new group/frame with its children.

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>"
    },
    "name": "group_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
nameNo
asFrameNoWrap in a frame instead of a group
nodeIdsYesFigma node ids, e.g. ['12:34']

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?

With no annotations, the description carries the full burden and does well: it discloses that absolute positions and z-order are preserved, that frames are transparent, non-clipping, and auto-sized to child bounds, and that the new wrapper plus children is returned. It does not cover failure behavior for mixed-parent inputs or whether grouping is reversible.

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?

Three sentences, front-loaded with the core action, then the frame variant, then the invariants and return value. No sentence could be removed without losing information.

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 4-parameter mutation with no output schema, the description covers action, invariants, and return shape, so an agent can invoke it confidently. The remaining gap is the undocumented name parameter and the absence of sibling routing.

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

Parameters3/5

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

Schema coverage is 75%, so the baseline is 3. The description adds real meaning for asFrame (transparent, non-clipping, bounds-sized) beyond the schema's one-line hint, but it says nothing about the undocumented name parameter or how file defaults interact with it.

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 gives a specific verb and resource (wrap nodes sharing a parent into a group) and adds a precise variant definition for asFrame. It is clearly distinguishable from creation tools like create_frame because the input is existing nodes rather than new geometry, though it never names a sibling explicitly.

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?

Usage is implied by the precondition that nodes must share the same parent, and asFrame is presented as the alternate mode. There is no explicit when-to-use versus create_frame or reparent_nodes, and no statement of what happens when the shared-parent precondition is violated.

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