Fit sections to their content
figma_fit_sectionsResize 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
| Name | Required | Description | Default |
|---|---|---|---|
| nodeIds | Yes | SECTION ids. | |
| padding | No | Padding: one number for all sides ("24"), or four comma-separated ("48,48,32,32") for top,right,bottom,left. | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| minWidth | No | ||
| minHeight | No | ||
| idempotencyKey | No | Caller-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. |