Skip to main content
Glama
FigeloMCP
by mmonzera

set_auto_layout

Configure auto-layout on a Figma frame or component: set direction, spacing, padding, and alignment to control how child elements stack and distribute.

Instructions

Configure auto-layout direction, spacing, padding, and alignment on a frame or component.

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

Input Schema

NameRequiredDescriptionDefault
nodeIdYesTarget frame/component node ID
channelNoOptional Figma document channel, fileKey, or documentName when multiple Figma files are open
layoutModeYes
layoutWrapNo
paddingTopNo
itemSpacingNo
paddingLeftNo
paddingRightNo
paddingBottomNo
counterAxisAlignItemsNo
primaryAxisAlignItemsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden for a mutation tool and leaves key behavior undisclosed: layoutMode is required, so every call forces a mode, yet the description never says that setting NONE removes auto-layout or what happens to children (reflow, repositioning). It also omits permission/auth requirements, reversibility, and whether omitted padding/spacing keep their current values.

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?

A single well-formed sentence with the verb and target front-loaded and zero filler. It is efficient, but its brevity stems partly from under-specification rather than density.

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

Completeness2/5

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

An 11-parameter mutation tool with no annotations, no output schema, and 18% schema coverage gets only one sentence. Nothing is said about the call outcome, what state the frame must be in, or how omitted optional params behave, which leaves an agent guessing on a fairly complex setter.

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 only 18% (nodeId and channel documented), so the description must compensate. It does partially: 'direction, spacing, padding, alignment' maps conceptually onto layoutMode/layoutWrap, itemSpacing, the four padding params, and the two alignment params. However it never explains enum meanings (NONE, BASELINE, SPACE_BETWEEN), which params are optional vs required, or the undocumented 'channel' parameter.

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?

Names a specific verb+resource ('Configure auto-layout') and enumerates the property families it touches (direction, spacing, padding, alignment), plus the target type ('frame or component'). It is clearly distinct from siblings like create_frame or set_selection, though it never explicitly names an alternative setter.

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 only implied: the phrase 'on a frame or component' tells the agent the target must be a frame-like node, but there is no statement of prerequisites (does the frame already need auto-layout enabled?), no when-not-to-use case, and no routing to a sibling for other frame properties.

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