Skip to main content
Glama

Bind variable

figma_bind_variable_to_node
Idempotent

Bind a Figma variable or design token to node properties like fill, stroke, radius, or padding so edits propagate automatically.

Instructions

Bind a variable (design token) to a property of nodes so it follows the variable. field: fill, stroke (COLOR; index picks the paint, which must be SOLID — a gradient or image is refused, not replaced), radius, gap, padding (all four sides), width, height, opacity, visible; "effect.color" / "effect.radius" / "effect.spread" / "effect.offsetX" / "effect.offsetY" and "grid.count" / "grid.gutterSize" / "grid.offset" / "grid.sectionSize" with index for the effect or grid; on text, the text fields (fontSize, lineHeight, letterSpacing, fontFamily, fontStyle, fontWeight) go to Figma as is, a refusal coming back per item; or any Figma bindable field (paddingLeft, topLeftRadius, characters). Library variables bind by the id figma_get_variable_defs { nodeId } reports; a token inside a style: figma_update_style. Returns per-item results: { updated, items: [{ id, ok, error? }] } — one node failing does not fail the call. Editors: Design; unverified: FigJam, Slides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYese.g. "fill", "radius", "gap", "padding", "effect.color", "fontSize".
indexNoWhich paint, effect or grid (0 = the first, the default).
nodeIdsYesNodes to change.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
variableIdNoe.g. "VariableID:1:2".
variableNameNoOr its full name, e.g. "color/bg/default".
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. First observedv0.1.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly=false, idempotent=true, destructive=false), and the description adds substantial behavior beyond them: per-item result shape, that one failing node does not fail the whole call, per-item refusals for unsupported text fields, and editor support (Design verified; FigJam/Slides unverified).

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 purpose, then the field taxonomy, alternative routes, and return shape. It is dense and the long field enumeration is heavy, but nearly every clause carries actionable information an agent needs to pick valid field values.

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?

No output schema exists, but the description supplies the return contract ({ updated, items: [{ id, ok, error? }] }), failure semantics, refusal cases, and editor coverage. Combined with the fully documented schema and idempotencyKey retry guidance, an agent has everything needed to call it correctly.

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 is 3, but the description adds real meaning: it explains which `field` values exist and their semantics, that `index` selects the specific paint/effect/grid and must be SOLID, and how variableId vs variableName relate. This goes beyond the schema's terse examples.

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+scope: binding a variable (design token) to a node property so the node follows the variable. It enumerates exactly which properties are bindable, letting an agent distinguish it from siblings like figma_set_variable_value (changes a value) or figma_create_variable (creates a token).

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?

Gives clear routing context: library variables bind by the id reported by figma_get_variable_defs { nodeId }, and a token inside a style is handled by figma_update_style instead. It also states exclusions (gradient/image paints are refused, not replaced). It stops short of an explicit when-not-to-use-this vs figma_set_variable_value comparison.

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