Skip to main content
Glama

set_layout_props

Set Figma node auto-layout sizing and child properties: HUG, FILL, FIXED, alignment, grow, positioning, and min/max bounds.

Instructions

Set a node's auto-layout sizing and child properties. layoutSizingHorizontal / layoutSizingVertical (HUG = shrink to fit children, FILL = stretch to fill the auto-layout parent, FIXED = keep the current size) are the preferred way to size a frame to its content (HUG) or make a child fill its container (FILL) — reach for these instead of guessing pixel sizes with resize_nodes. layoutAlign (STRETCH = fill the counter axis, INHERIT = default) and layoutGrow (1 = fill the primary axis, 0 = hug) are the older per-axis equivalents. layoutPositioning (ABSOLUTE = ignore the flow and position freely, AUTO = participate in layout). minWidth / maxWidth / minHeight / maxHeight set responsive size bounds (→ min-w / max-w); pass null to clear a bound. Bounds apply to auto-layout frames and their direct children. HUG needs an auto-layout frame (or text); FILL needs an auto-layout parent. Any field may be omitted to leave it unchanged. Returns { ok, nodeId }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesNode id — an auto-layout frame, or a child inside one
maxWidthNoMaximum width in px (null clears the bound)
minWidthNoMinimum width in px (null clears the bound)
maxHeightNoMaximum height in px (null clears the bound)
minHeightNoMinimum height in px (null clears the bound)
layoutGrowNo1 = grow to fill the primary axis, 0 = hug content
layoutAlignNoCounter-axis alignment; STRETCH fills the counter axis
layoutPositioningNoABSOLUTE takes the node out of the auto-layout flow
layoutSizingVerticalNoVertical sizing: HUG fits content, FILL fills the parent, FIXED keeps height
layoutSizingHorizontalNoHorizontal sizing: HUG fits content, FILL fills the parent, FIXED keeps width
Behavior4/5

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

Annotations already mark the operation as non-read-only and non-destructive. The description adds context about property semantics and constraints (e.g., bounds apply to auto-layout frames and direct children), but it does not explicitly address error behavior when constraints are violated, which would add further transparency.

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?

The description is long but necessary for a 10-parameter tool. It is logically structured and front-loaded with the main purpose. It could be slightly more compact, but every sentence carries relevant information.

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 complex mutation tool with no output schema, it covers property semantics, prerequisites, and the return shape ({ ok, nodeId }). It does not specify behavior for invalid combinations (e.g., FILL without an auto-layout parent), which leaves a minor gap, but overall it is quite complete.

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 100%, so baseline is 3. The description adds interpretive value by explaining HUG/FILL/FIXED in plain terms, linking layoutAlign/layoutGrow as older equivalents, and clarifying null semantics for bounds. However, much of this is already present in the schema, so the added value is moderate.

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 opens with a specific verb and resource: 'Set a node's auto-layout sizing and child properties.' It clearly enumerates the properties and explicitly differentiates from resize_nodes by recommending HUG/FILL over guessing pixel sizes, which distinguishes it from a key sibling.

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

Usage Guidelines5/5

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

It provides explicit when-to-use guidance: 'reach for these instead of guessing pixel sizes with resize_nodes' and gives conditions for HUG (needs auto-layout frame/text) and FILL (needs auto-layout parent). It also clarifies that older per-axis equivalents exist and that omitted fields are left unchanged.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/awdr74100/figwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server