Skip to main content
Glama

Set fills

figma_set_fills
Idempotent

Replace 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

TableJSON Schema
NameRequiredDescriptionDefault
fillsYesBottom to top, as in Figma's fill list.
nodeIdsYesNodes to change.
opacityNoDefault opacity for entries that do not set their own.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
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?

Beyond the annotations (which cover read/write, idempotency, open-world), the description discloses important behavior: all entries are validated before any node mutates, per-item results mean one bad node does not fail the call, and editor support is flagged (Design verified; FigJam/Slides unverified). It also describes the return shape, which is not in any output schema.

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, then semantics, then routing, then return contract. It is dense and occasionally restates schema detail (the angle convention appears in both), but nearly every clause carries actionable information for a complex nested-schema tool.

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 a write tool with a deeply nested schema and no output schema, the description covers purpose, per-entry validation, partial-failure semantics, the exact return object, idempotency implications, and environment caveats. Nothing an agent needs 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 100%, so the baseline is 3. The description adds conceptual grouping beyond the per-field schema text — which gradient type takes `angle` vs `center` vs `radius`, that linear angles use CSS convention and are fitted per node size, and that a stacked `fills` array is ordered bottom-first. This reduces mis-assembly of nested paint objects.

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?

The description opens with a specific verb and resource — 'Replace the fill paints of nodes' — and enumerates the payload kinds (solid colours, gradients, images, stacked fills). It explicitly distinguishes itself from figma_apply_style_to_node (named styles) and figma_set_strokes (outlines), so an agent can route correctly without opening a 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?

It names alternatives with the condition that selects them: 'to apply a named local style use figma_apply_style_to_node; for outlines use figma_set_strokes', and routes new images to figma_import_image. It also states the empty-fills case ('An empty `fills` removes every fill'). When/when-not guidance is explicit.

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