Skip to main content
Glama

set_fill

Apply fill or background color to Figma nodes using hex, gradients, custom tokens, or batch updates.

Instructions

Set fill or background color on a node.

set_fill({node: "1:2", bg: "#F5F5F5"}) set_fill({node: "1:2", fill: "#333333"}) set_fill({node: "1:2", bg: "linear-gradient(135deg, #8B5CF6 0%, #F97316 100%)"})

// Batch — bulk paint update in one call: set_fill({nodes: [{node: "1:2", bg: "#FFF"}, {node: "1:3", bg: "#F5F5F5"}]})

fill = text color or shape fill. bg = frame background. For stroke color, use set_stroke.

Accepted color formats (for fill or bg): hex "#FFF", "#F5F5F5" gradient string CSS-like subset, not full CSS: "linear-gradient(deg, <#hex> %, ...)" "linear-gradient(to , ...)" directions: top/right/bottom/left + corners "radial-gradient()" centered, no position/shape modifiers "radial-gradient(circle, )" circle shape only "conic-gradient(from deg, ...)" Rejected: "circle at X% Y%", "ellipse at ...", named colors, hsl(). variable token qualified bare name "$Surface/Card" transparent "transparent" (bg only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeNoNode ID (single mode)
fillNoText color or shape fill — hex, gradient string, or qualified bare-name token
bgNoBackground — hex, gradient string, "transparent", or qualified bare-name token
nodesNoBatch: [{node, fill?, bg?}]
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses accepted color formats (hex, gradients, variable tokens, transparent), explicitly rejects certain gradient patterns (e.g., 'circle at X% Y%'), and notes that 'transparent' is bg-only. This is highly transparent about tool behavior and limitations.

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?

The description is fairly long but well-structured with examples, bullet points, and clear sections. Every sentence adds value, and the format specifications are necessary given the complexity. Minor verbosity prevents a perfect score, but it remains readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description thoroughly covers all parameters, usage modes, and format constraints. However, it does not mention return values or error cases (e.g., what happens with invalid input). Given the absence of an output schema, this is a minor gap, but the core functionality is well-explained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds substantial meaning beyond the schema: it explains the semantic difference between fill and bg, provides concrete examples, details accepted formats, and describes the batch parameter structure. This significantly aids correct usage.

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 clearly states the tool sets fill or background color on a node, with examples for single and batch modes. It distinguishes between fill (text/shape fill) and bg (frame background) and differentiates from sibling set_stroke.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit alternatives ('For stroke color, use set_stroke') and includes example calls. It does not explicitly state when not to use the tool, but the examples and format restrictions serve as implicit guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/musepy/genable'

If you have feedback or need assistance with the MCP directory API, please join our Discord server