Skip to main content
Glama

Set constraints

figma_set_constraints
Idempotent

Set horizontal and vertical constraints on Figma nodes so they follow parent frame resizing. Omit an axis to preserve its existing constraint.

Instructions

Responsive constraints: how nodes follow their parent frame when it resizes. horizontal: left, right, center, left-right, scale; vertical: top, bottom, center, top-bottom, scale (Figma's MIN/MAX/CENTER/STRETCH/SCALE also accepted). Omit one axis to keep it. Children of an auto-layout frame are positioned by the layout instead. Returns per-item results: items: [{ id, ok, error? }] — one node failing does not fail the call. Editors: Design; unverified: FigJam, Slides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdsYes
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
verticalNo
horizontalNo
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (idempotent=true, destructive=false), it discloses partial-failure semantics ('one node failing does not fail the call') and the per-item return shape, plus the axis-omission rule and editor support. This is meaningful behavioral context the annotations do not carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core concept is front-loaded, and each following clause earns its place: value lists, axis-omission rule, auto-layout exception, return shape, editor scope. Dense but zero filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no output schema, it covers what an agent needs: valid values, default axis behavior, failure semantics, return format, and editor applicability. Nothing material is missing.

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?

With only 40% schema coverage, the description compensates well by spelling out the accepted values for both horizontal and vertical (including Figma's MIN/MAX/CENTER/STRETCH/SCALE aliases) and the omission semantics. It leaves nodeIds (max 500) and session unaddressed, so not fully complete.

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?

The description defines the exact resource and scope: responsive constraints governing how nodes follow their parent frame on resize, with both axes and their accepted values enumerated. The auto-layout caveat ('Children of an auto-layout frame are positioned by the layout instead') distinguishes it from layout-oriented siblings without opening a schema.

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?

It gives a clear when-not ('children of an auto-layout frame are positioned by the layout') and a usage rule ('omit one axis to keep it'), plus editor applicability. It stops short of naming an explicit alternative tool to use instead, so it lands just under full marks.

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