Skip to main content
Glama
OpenFigma MCP

OpenFigma MCP

set_item_spacing

Adjusts the spacing between an auto-layout frame's children and between wrapped rows or columns. Use it to control gap distance in Figma layouts without moving items manually.

Instructions

Set the spacing between an auto-layout frame's children, and between wrapped rows

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": {
      "nodeId": "<nodeId>"
    },
    "name": "set_item_spacing"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeIdYesThe ID of the frame to modify
itemSpacingNoDistance between children. Note: This value will be ignored if primaryAxisAlignItems is set to SPACE_BETWEEN.
counterAxisSpacingNoDistance between wrapped rows/columns. Only works when layoutWrap is set to WRAP.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it only restates the mutation target. It does not disclose what happens when the node is not an auto-layout frame, whether the change is reversible, or that itemSpacing is silently ignored under SPACE_BETWEEN (that caveat lives only in the schema). The mutation semantics are implied but not substantiated.

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?

A single front-loaded sentence with no filler, and the primary behavior (child spacing) precedes the secondary behavior (wrapped-row spacing). Nothing can be removed without losing scope.

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

Completeness3/5

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

For a three-parameter mutation tool with no output schema and fully documented parameters, the description covers the core intent adequately. It is thin on preconditions and failure behavior, which matters more here because no annotations supply a safety profile.

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 description coverage is 100%, and the schema already explains nodeId, itemSpacing (including the SPACE_BETWEEN exception), and counterAxisSpacing (WRAP-only). The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

Specific verb ('Set') plus a precisely scoped resource: the spacing between an auto-layout frame's children and between wrapped rows. An agent can tell this is a spacing mutation on a layout frame rather than a padding, alignment, or sizing change. It stops short of naming a sibling alternative to reinforce the distinction.

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

Usage Guidelines2/5

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

The description never states when to use this versus adjacent siblings such as set_padding, set_axis_align, or set_layout_mode, nor does it note the precondition that the target must be an auto-layout frame. Usage must be inferred from the phrase 'auto-layout frame's children'.

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