Skip to main content
Glama

Set fills

figma_set_fills
Idempotent

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).

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

NameRequiredDescriptionDefault
fillsYesBottom to top, as in Figma's fill list.
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.
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. 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.8/5.0
Behavior5/5

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

Annotations cover safety (readOnly=false, destructive=false, idempotent=true), and the description adds real context beyond them: all entries validated before any node changes, per-item partial-failure semantics (one node failing doesn't fail the call), the STALE-refusal/`force` contract, and the raw-paint-vs-style distinction. This is substantive behavioral disclosure, not restating hints.

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 progressively discloses paint kinds, alternatives, and return shape. Dense but nearly every sentence carries information; only the gradient-geometry detail (diagonal exactness on squares) is slightly more verbose than an agent needs before calling.

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 mutation tool with rich annotations but no output schema, the description supplies return shape (`{ updated, items: [{ id, ok, error? }] }`), failure isolation, and stale-write handling. Nothing critical for a correct invocation 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 baseline would be 3, but the description adds real meaning: fills are ordered bottom-to-top with a concrete stacked example, gradient angles are fitted per node's size, `image` reuses an existing `imageHash` from figma_import_image, and an empty `fills` removes every fill. These clarify semantics the schema alone leaves implicit.

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?

States a specific verb+resource: 'Replace the fill paints of nodes', and then enumerates the supported paint kinds (solid, gradient, image, stacked). It explicitly distinguishes itself from figma_apply_style_to_node (named styles) and figma_set_strokes (outlines), so an agent can route without opening siblings.

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-to-use routing: apply a named style → figma_apply_style_to_node, outlines → figma_set_strokes, and new images → figma_import_image. It also flags the editor support matrix (Design verified; FigJam/Slides unverified), which is actionable guidance for whether to call it at all.

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