Skip to main content
Glama

bind_variable_to_paint

Bind a color variable to a Figma node's solid fill or stroke paint to apply design tokens, or unbind by passing null.

Instructions

Bind a COLOR variable to a SOLID fill or stroke paint (the design-token way to colour a node) — or unbind by passing variableId: null. Figma stores fill/stroke colour bindings on the paint, not the node, so this is separate from bind_variable_to_node (which covers scalar fields like width / padding / radius). target is fills (default) or strokes; index selects which paint (default 0). The paint at that index must be SOLID. Returns { ok, nodeId }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoIndex of the paint within the list (default 0)
nodeIdYesNode whose fill/stroke paint to bind
targetNoWhich paint list to bind on (default fills)
variableIdYesCOLOR variable id to bind, or null to remove the binding
Behavior4/5

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

Annotations only indicate a non-read-only, non-destructive mutation. The description adds valuable behavioral details: Figma stores bindings on the paint rather than the node, unbinding via null, and the 0-index default for paint selection. This goes beyond the annotation hints, though it doesn't fully cover error handling or edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is exceptionally concise: three sentences, each packed with relevant information. It front-loads the primary action, then provides necessary elaboration without repetition or fluff.

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?

For a tool with 4 parameters and no output schema, the description covers the main use case, the alternative tool, and the return shape. It lacks some edge-case details (e.g., behavior when index is out of range or paint is not solid), but it is otherwise complete for typical usage.

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, but the description adds meaning by explaining the purpose of target/index defaults and clarifying that variableId null means unbind. It also introduces the 'must be SOLID' constraint not present in the schema, which 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 opens with a precise action: 'Bind a COLOR variable to a SOLID fill or stroke paint', immediately clarifying what the tool does. It explicitly contrasts with bind_variable_to_node, distinguishing this tool's scope (paint bindings) from scalar node bindings, which is a clear sibling differentiation.

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?

The description explicitly states when to use this tool vs the alternative: 'this is separate from bind_variable_to_node (which covers scalar fields like width / padding / radius)'. It also explains the paint/node distinction and the requirement that the paint must be SOLID, giving clear situational 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/awdr74100/figwright'

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