Skip to main content
Glama

figma_set_auto_layout

Configure Auto Layout on a Figma node by setting direction, spacing, padding, alignment, and FIXED/HUG/FILL sizing to control frame resizing and child arrangement.

Instructions

设置 Auto Layout。打开后要把横排全宽设 FIXED 或子项 FILL,否则会 HUG 变窄。

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": "figma_set_auto_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeIdYes
paddingNo
layoutModeYes
itemSpacingNo
verticalSizingNo
counterAxisAlignNo
horizontalSizingNo
primaryAxisAlignNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose one genuinely non-obvious behavior — that omitting FIXED/FILL sizing causes the node to HUG and collapse in width — which is valuable. However, it says nothing about permissions, whether existing layout settings are overwritten, or what happens to children when layoutMode is NONE.

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 short sentences, front-loaded with the action and followed by a single caveat. The caveat sentence is slightly compressed and reads ambiguously ('横排全宽' / '子项'), but nothing is wasted.

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 8-parameter mutation with zero schema coverage and no output schema needs far more: what each sizing/alignment parameter does and which combinations are invalid. The description covers one pitfall and leaves the rest to the agent's guesswork.

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

Parameters2/5

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

Schema description coverage is 0% across 8 parameters, so the description must compensate, and it largely does not. It hints at horizontalSizing/horizontalSizing values (FIXED, FILL) and the HUG side effect, but leaves layoutMode, padding, itemSpacing, and the four align parameters entirely unexplained.

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 opens with a specific verb+resource ('设置 Auto Layout'), which is distinct from the property-setting siblings (corner radius, fill, stroke, effects). It does not explicitly contrast with any sibling, but the target resource is unambiguous.

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 by the tool name and the pitfall note. There is no explicit statement of when to call this versus figma_create_frame or figma_update_node, and no prerequisites (e.g., that nodeId must be a frame/component).

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