Skip to main content
Glama

Fit sections to their content

figma_fit_sections
Idempotent

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.

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

NameRequiredDescriptionDefault
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
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. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare a non-destructive, idempotent write, so the safety profile is covered. The description then adds genuinely useful behavior beyond that: inner-first fitting order, that children move only when inside top/left padding, that connectors follow their ends, that empty sections are skipped with a note, and per-section results. The one real weakness is editor support, which is hedged as 'unverified in Design, FigJam, Slides' rather than stated as a constraint. Strong on disclosure but not fully resolved on support.

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?

Core action is front-loaded in the first clause, with edge cases and exclusions following in a sensible order. The single dense paragraph carries a lot of parenthetical detail (padding format, editor caveat) that slows scanning, but no sentence is truly 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?

There's no output schema, and the description compensates by stating the return shape ('per-section results with the new size'). Combined with edge-case handling for empty sections, connectors, and nested sections, an agent has everything needed to call this correctly on a 7-parameter write tool.

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?

Adds meaning beyond the 71%-covered schema: the default padding of 32, a realistic board-wrapper example, and the floor semantics of minWidth/minHeight, which have no schema descriptions at all. It doesn't explain the interplay between force/STALE and section fitting, but the schema already documents force thoroughly.

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 ('Resize sections to hug what they hold plus padding'), which is a distinct operation from plain resizing. It explicitly names the sibling that does the other thing ('A size you choose: figma_resize_nodes'), so an agent can separate the two without reading schemas.

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-nots ('Do not fit a participatory zone sized for the activity, or one of a grid of equal sections') and an alternative for the opposite case (figma_resize_nodes). It also states ordering behavior for co-listed sections, so an agent knows how to batch the call.

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