Skip to main content
Glama

Configure auto-layout

figma_set_auto_layout
Idempotent

Configure 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

TableJSON Schema
NameRequiredDescriptionDefault
gapNoSpace between items, px; negative overlaps them.
modeNo
wrapNo
alignXNo
alignYNo
nodeIdYes
rowGapNoSpace between wrapped rows, px. Needs wrap.
paddingNoPadding: one number for all sides ("24"), or four comma-separated ("48,48,32,32") for top,right,bottom,left.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
alignContentNoHow wrapped rows share the height. Needs wrap.
counterSizingNo
primarySizingNo
reverseZIndexNoDraw the first item on top (with a negative gap).
idempotencyKeyNoCaller-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.
strokesInLayoutNoCount the frame's stroke as space, so children sit inside it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare idempotent=true, destructiveHint=false, and readOnlyHint=false, but the description adds real behavioral context on top: mode:'none' removes auto-layout, negative gap overlaps items, 'every value is checked before the frame changes' (validation/atomicity), and editor support (Design; unverified FigJam, Slides). This is exactly the kind of extra context the annotations cannot carry.

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?

Front-loaded with the field inventory, then constraints, then sibling routing and editor support. Every sentence carries a distinct constraint, but it is a dense run-on block that is harder to scan than a broken-out list would be.

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 15-parameter mutation tool with 53% schema coverage, no output schema, and present annotations, the description covers the behaviorally risky parameters (mode, wrap, gap, alignment) well and correctly omits return-value explanation. Remaining gaps are the loosely-specified axis sizing pair and session handling, which the schema partly carries.

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

Parameters4/5

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

Schema coverage is only 53%, so the description has to compensate, and it does well: it defines alignX/alignY semantics, wrap's horizontal requirement, rowGap defaulting to gap, alignContent sharing wrapped-row height, and negative-gap overlap with reverseZIndex. Axis sizing is covered only loosely ('axis sizing') and counterSizing/primarySizing specifics are left to the schema, so it stops short of full compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Full auto-layout configuration on one node') and enumerates the exact fields it governs (mode, gap, padding, alignment, wrap, axis sizing). It also routes clipping responsibility to the sibling figma_set_clips_content, so an agent can separate this tool from adjacent layout tools.

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

Usage Guidelines4/5

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

Gives clear usage conditions (wrap needs a horizontal layout; baseline only as alignY of a row; space-between only along the layout direction) and names an alternative for the clipping case. It does not explicitly contrast with figma_check_layout or other layout-adjacent siblings, so it falls short of full when/when-not routing.

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

Deploy Server

Other Tools