Set fills
figma_set_fillsReplace a Figma node's fill paints with solid colors, gradients, or images, including stacked fills. Pass an empty list to clear all fills.
Instructions
Replace the fill paints of nodes: solid colours, gradients, images, several stacked fills (bottom first — [{ image }, { gradient }] is a photo under a scrim on one node). A gradient is linear, radial, angular or diamond; a linear one takes a CSS angle (90 = left → right, the default; 180 = top → bottom), fitted to each node's own size; radial and diamond take center / radius, angular takes center only. An image entry reuses an image already in the file by the imageHash figma_import_image returns; to bring a new picture in use figma_import_image. An empty fills removes every fill. Every entry is validated before any node changes. This sets raw paints — to apply a named local style use figma_apply_style_to_node; for outlines use figma_set_strokes. Returns per-item results: { updated, items: [{ id, ok, error? }] } — one node failing does not fail the call. Editors: Design; unverified: FigJam, Slides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fills | Yes | Bottom to top, as in Figma's fill list. | |
| nodeIds | Yes | Nodes to change. | |
| opacity | No | Default opacity for entries that do not set their own. | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| 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. |