Skip to main content
Glama
southleft

figma-console-mcp

by southleft

figma_set_layout

Configure a Figma frame's auto layout or grid layout and place child nodes in one call using gaps, padding, alignment, sizing, and grid tracks.

Instructions

Set a frame's auto layout or grid layout in one call, and place its children. Auto layout: mode HORIZONTAL or VERTICAL, gap, padding, primaryAlign (MIN, CENTER, MAX, SPACE_BETWEEN, SPACE_EVENLY, SPACE_AROUND), counterAlign, wrap with counterAxisGap and alignContent, and sizing (FIXED, HUG, FILL). Grid: mode GRID with tracks written CSS-style (grid.columns: '240px 1fr 1fr', 'repeat(3, 1fr)', 'auto 1fr', or a count), gaps, autoRows, autoFlow, and per-child row, column, spans and alignment. Only the fields you pass change. Returns the resulting layout, with grid tracks as CSS. Requires Desktop Bridge.

Input Schema

NameRequiredDescriptionDefault
gapNoSpace between items. On a grid, sets both row and column gaps
gridNo
modeNo
wrapNoWrap children onto new lines (HORIZONTAL or VERTICAL)
widthNo
heightNo
nodeIdYesFrame, component or instance to lay out
fileKeyNoLocal Mode only. Run against this specific connected file instead of the active file. Get connected fileKeys from figma_list_open_files. Rejected in Cloud Mode, which pairs with a single plugin instance.
paddingNoOne number for all sides, or {top, right, bottom, left}
childrenNo
alignContentNoHow wrapped lines are spaced
counterAlignNo
primaryAlignNo
reverseZIndexNoStack earlier children on top (canvas stacking)
counterAxisGapNoSpace between wrapped rows or columns (wrap only)
verticalSizingNo
horizontalSizingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations present, the description carries the full behavioral burden and does meaningful work: 'Only the fields you pass change' discloses partial-update semantics for a 17-parameter setter, 'Returns the resulting layout, with grid tracks as CSS' discloses the response shape, and 'Requires Desktop Bridge' discloses an environment prerequisite. It stops short of saying what happens to children not listed or whether re-parenting nodes into the frame is destructive, which is the main residual gap.

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 front-loaded paragraph that begins with purpose and then walks the parameter space in the order an agent would set it. It is dense rather than bloated, though re-listing the enum members (MIN, CENTER, MAX, SPACE_BETWEEN, …) duplicates what the schema already declares and could be trimmed.

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 17-parameter nested-object tool with no output schema and no annotations, the description covers the mode split, the parameter surface, partial-update behavior, return format, and the Desktop Bridge requirement. Missing pieces are secondary: the meaning of width/height, how the children array's ordering interacts with autoFlow, and error/rejection behavior in Cloud Mode.

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 47%, so the description must compensate, and it largely does: it names the auto-layout knobs (gap, padding, primaryAlign, counterAlign, wrap/counterAxisGap/alignContent, sizing), spells out the grid track string grammar with concrete examples ('repeat(3, 1fr)', 'auto 1fr', or a count), and covers per-child row, column, spans and alignment. width/height and reverseZIndex are left unexplained in both places, keeping it below a 5.

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 and resource: 'Set a frame's auto layout or grid layout in one call, and place its children.' That scope is distinct from the neighboring node-mutation tools (figma_resize_node, figma_move_node, figma_arrange_component_set), and the two-mode breakdown (auto layout vs grid) makes the capability 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 context is implied by the field enumerations and by 'Requires Desktop Bridge,' and 'in one call' hints at batching layout plus child placement instead of multiple calls. But it never states when to use this versus figma_resize_node or figma_arrange_component_set, and offers no exclusions or prerequisites beyond the Desktop Bridge note.

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