Skip to main content
Glama

Configure auto-layout

figma_set_auto_layout
Idempotent

Full auto-layout configuration on one node: mode, gap, padding, alignment, wrap, and axis sizing. mode: "none" removes auto-layout.

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

NameRequiredDescriptionDefault
gapNoSpace between items, px; negative overlaps them.
modeNo
wrapNo
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
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. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare mutation (readOnlyHint=false), idempotency, and non-destructiveness; the description adds real behavioral detail beyond them — values are validated before the frame changes, negative gap overlaps items, reverseZIndex controls stacking, and rowGap defaults to gap. It also discloses editor support/verification status (Design verified; FigJam, Slides unverified), which is genuinely useful context.

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?

Dense and front-loaded: purpose first, then constraints, then edge cases and sibling pointer. Sentence fragments are efficient rather than padded, though the density of caveats (wrap, baseline, overlap) makes it slightly hard to scan quickly.

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 16-parameter mutation tool with no output schema, the description plus rich schema descriptions and annotations cover nearly everything an agent needs to invoke correctly, including validation-before-write and editor support. It stops short of describing what the response returns or how conflicting sizing options interact.

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 description coverage is only 56% across 16 params, but the description compensates well for the ambiguous ones: screen-direction semantics for alignX/alignY with validity constraints, rowGap defaulting to gap, alignContent controlling wrapped-row height, negative-gap overlap behavior, and axis sizing. The remaining gaps (strokesInLayout, primarySizing/counterSizing details) are partially covered, so it's strong but not exhaustive.

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?

Opens with a specific verb+resource+scope ('Full auto-layout configuration on one node') and enumerates the exact properties it controls (mode, gap, padding, alignment, wrap, axis sizing). It also routes clipping to the sibling figma_set_clips_content, so an agent can distinguish it from adjacent layout tools without opening schemas.

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 concrete conditions: mode:'none' removes auto-layout, wrap requires a horizontal layout, baseline only applies as alignY of a row, space-between only along the layout direction. These establish when each option is valid, though it doesn't explicitly contrast with alternatives like figma_check_layout or when to prefer this over resizing directly.

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