Skip to main content
Glama
OpenFigma MCP

OpenFigma MCP

bind_color_variable

Bind a node's fill or stroke to a local color variable by ID or name, ensuring consistent color usage across Figma designs.

Instructions

Bind a node's fill or stroke colour to a local colour variable, by ID or by the name get_variables lists

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "nodeId": "<nodeId>",
      "property": "<property>"
    },
    "name": "bind_color_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeIdYesThe node's ID
propertyYes
collectionNoThe collection's name, when the variable name repeats
variableIdNoThe variable's ID
variableNameNoThe variable's name, e.g. "Labels/Primary"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does usefully disclose that the variable must be "local" and that binding accepts either an ID or a name. It does not say whether existing fills are replaced or appended, whether all paints on the node are affected, or what happens if the variable is not found.

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?

One sentence, front-loaded with the action and target, then the identifier-resolution hint. No filler and no restatement of the tool name.

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 5-parameter mutation with no annotations and no output schema, the definition covers the essential call-shaping facts (local-only scope, ID-or-name identification). The remaining gap is effect semantics — what happens to the node's existing paint — which an agent would want before calling.

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 80%, so the baseline is 3, and the description goes beyond it by establishing that variableId and variableName are alternative ways to identify the same variable and that names must match what get_variables lists. It also ties the property parameter to fill/stroke semantics present in the enum.

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?

"Bind a node's fill or stroke colour to a local colour variable" gives a precise verb, target, and resource, and the word "bind" distinguishes it from literal-paint tools like set_fill_color. It also points at get_variables for name resolution, so the agent knows where the referenced identifier comes from.

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

Usage Guidelines3/5

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

The description implies when this is appropriate (binding instead of setting a fixed colour) and tells the agent to source names from get_variables, but it never states the contrast with set_fill_color/set_stroke_color or when binding is preferable. Usage is inferable rather than stated.

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