Skip to main content
Glama

set_layout_child

Configure child nodes inside an auto-layout parent by setting horizontal/vertical sizing, positioning, grow, align, and min/max dimensions, returning per-node results.

Instructions

Set how nodes behave inside their auto-layout parent: horizontal/vertical sizing (FILL needs an auto-layout parent; HUG needs the node itself to be auto layout or text), positioning AUTO|ABSOLUTE (ignore auto layout), grow (1 = fill along parent's direction), alignSelf STRETCH|INHERIT (fill across parent's direction), and min/max width/height (null clears). Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "nodeIds": "<nodeIds>"
    },
    "name": "set_layout_child"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
growNolayoutGrow: 0 or 1
nodeIdsYesFigma node ids, e.g. ['12:34']
maxWidthNo
minWidthNo
verticalNolayoutSizingVertical
alignSelfNolayoutAlign
maxHeightNo
minHeightNo
horizontalNolayoutSizingHorizontal
positioningNolayoutPositioning

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses batch partial-failure semantics ('one failing node does not abort the batch'), the per-node return shape ({id, ok} or {id, error}), and that null clears min/max. It stops short of stating permission or plugin-dependency requirements, which keeps it from a 5.

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-loads the purpose, then packs parameter semantics compactly, ending with return behavior. It is a dense single sentence, but every clause maps to a distinct parameter or behavior; no 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 an 11-parameter mutation tool with no annotations and no output schema, the description covers prerequisites, enum semantics, null-clearing, and the batch return contract. An agent has enough to call it correctly without probing.

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 64%, but the description compensates by explaining the meaning of every enum: grow 1 fills along the parent's direction, alignSelf fills across it, ABSOLUTE ignores auto layout, and null clears min/max. Only the file parameter is left to the schema, so it adds clear value beyond the raw field names.

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

Purpose4/5

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

States a specific verb (Set) and a precise resource (how nodes behave inside their auto-layout parent), enumerating the exact sub-properties it controls. An agent can tell this governs child layout properties rather than the parent auto-layout itself, though it never names the sibling set_auto_layout to sharpen the contrast.

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?

Gives real preconditions — FILL requires an auto-layout parent, HUG requires the node to be auto layout or text — which is useful when-to-use context. However it never states when to reach for this versus set_auto_layout or set_constraints, so alternative routing is left to inference.

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