Configure auto-layout
figma_set_auto_layoutConfigure a Figma frame's auto-layout in one call: set direction, gap, padding, alignment, wrapping, and sizing, or remove auto-layout entirely.
Instructions
Full auto-layout configuration on one node: mode, gap, padding, alignment, wrap, and axis sizing. mode: "none" removes auto-layout. alignX / alignY are screen directions (space-between only along the layout direction; baseline only as alignY of a row). wrap needs a horizontal layout; a wrapped row spaces its rows by rowGap (default: the gap) and shares the height by alignContent. A negative gap overlaps items (an avatar stack — reverseZIndex puts the first on top). Every value is checked before the frame changes. Clipping: figma_set_clips_content. Editors: Design; unverified: FigJam, Slides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gap | No | Space between items, px; negative overlaps them. | |
| mode | No | ||
| wrap | No | ||
| alignX | No | ||
| alignY | No | ||
| nodeId | Yes | ||
| rowGap | No | Space between wrapped rows, px. Needs wrap. | |
| padding | No | Padding: one number for all sides ("24"), or four comma-separated ("48,48,32,32") for top,right,bottom,left. | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| alignContent | No | How wrapped rows share the height. Needs wrap. | |
| counterSizing | No | ||
| primarySizing | No | ||
| reverseZIndex | No | Draw the first item on top (with a negative gap). | |
| idempotencyKey | No | Caller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely. | |
| strokesInLayout | No | Count the frame's stroke as space, so children sit inside it. |