Skip to main content
Glama

Fit sections to their content

figma_fit_sections
Idempotent

Resize Figma sections to hug their contents plus padding, respecting minWidth and minHeight and fitting nested sections inner-first. Tightens section bounds while connectors follow their ends.

Instructions

Resize sections to hug what they hold plus padding ("32" by default, or "top,right,bottom,left" — a board wrapper often takes "68,60,100,80"), never below minWidth / minHeight. Sections listed together are fitted inner-first, so an outer one fits its inner ones' final size. Children move only when they reach into the top or left padding; connectors never move — they follow their ends. An empty section is left as it is, with a note. Do not fit a participatory zone sized for the activity, or one of a grid of equal sections. Works on Figma Design sections too. A size you choose: figma_resize_nodes. Returns per-section results with the new size. Editors: unverified in Design, FigJam, Slides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdsYesSECTION ids.
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.
minWidthNo
minHeightNo
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.8/5.0
Behavior5/5

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

Annotations only cover the safety profile (non-readonly, idempotent, non-destructive); the description goes well beyond them with ordering semantics (inner-first so outer sections fit final inner sizes), child-movement rules, the fact that connectors never move and follow their ends, empty-section handling with a note, and the min-width/height floor.

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-loaded with the core action and every sentence carries distinct information (defaults, ordering, edge cases, exclusions, return shape). It is dense to the point of being crowded, and the trailing 'Editors: unverified in Design, FigJam, Slides' is terse enough to be slightly ambiguous, but there is 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?

With no output schema, the description still tells the agent what comes back ('per-section results with the new size'), and it covers the mutation's side effects, edge cases, and environment limitations. For a 6-parameter batch mutation tool, nothing needed to call it correctly 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?

Schema coverage is 67% and minWidth/minHeight have no schema description at all; the description compensates by stating the 'never below minWidth / minHeight' semantics. It also supplies the concrete default ('32') and a realistic four-value example ('68,60,100,80') that clarifies the padding format beyond the schema's generic wording.

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: 'Resize sections to hug what they hold plus `padding`'. It also explicitly distinguishes itself from the sibling that would otherwise be confused with it ('A size you choose: figma_resize_nodes'), so an agent can route correctly without opening either schema.

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?

Gives explicit when-not guidance ('Do not fit a participatory zone sized for the activity, or one of a grid of equal sections') and names the alternative tool for the manual-sizing case. It also states the supported editors, which is a real selection condition.

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