Skip to main content
Glama
figma-mcp-v2

figma-mcp-v2

by LukasAnda

Bind variable to a property

figma_bind_variable

Bind a variable to a layer property—fills/strokes (with paint_index) or numeric fields like itemSpacing, paddingLeft, cornerRadius, width, or opacity—to keep design values linked.

Instructions

Binds a variable to a layer property: "fills"/"strokes" (color, with paint_index), or a numeric field like "itemSpacing", "paddingLeft", "cornerRadius", "width", "opacity".

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": {
      "node_id": "<node_id>",
      "field": "<field>",
      "variable_id": "<variable_id>"
    },
    "name": "figma_bind_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoFigma link (or file key) of the file to edit. Needed only when the plugin is open in more than one file.
fieldYes
node_idYesNode id, e.g. "12:345" (link form "12-345" also accepted)
paint_indexNo
variable_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare non-readOnly, non-destructive, openWorld and non-idempotent, so the safety profile is covered. The description adds only the constraint that color bindings take a paint_index; it says nothing about what happens on a type mismatch, whether an existing binding is replaced, or persistence behavior.

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?

A single sentence, front-loaded with the verb and resource, with the property taxonomy following immediately. No filler or restatement of the title.

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

Completeness3/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 40% schema coverage and no output schema, the definition covers the highest-value gap (the 'field' enum-like values) but omits variable_id semantics, error behavior, and whether the binding overwrites prior bindings. Adequate but clearly short of complete.

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?

With schema coverage at 40% and no schema description on 'field', 'variable_id', or 'paint_index', the description does real work: it lists concrete acceptable values for 'field' ("fills"/"strokes" and numeric fields like "itemSpacing", "cornerRadius", "opacity") and clarifies that paint_index applies only to color paints. It still leaves variable_id format and field/node compatibility unaddressed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Binds a variable to a layer property") and enumerates the target property families. It does not distinguish itself from plausible siblings such as figma_bind_tokens or figma_set_variable_value, so an agent cannot route between them from this description alone.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no prerequisites (e.g. the variable must already exist, field must be bindable on this node type), and no mention of alternatives. The only implicit guidance is embedded in the field-value examples, which is not the same as usage routing.

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