Bind variable
figma_bind_variable_to_nodeBind 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
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | e.g. "fill", "radius", "gap", "padding", "effect.color", "fontSize". | |
| index | No | Which paint, effect or grid (0 = the first, the default). | |
| nodeIds | Yes | Nodes to change. | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| variableId | No | e.g. "VariableID:1:2". | |
| variableName | No | Or its full name, e.g. "color/bg/default". | |
| idempotencyKey | No | Caller-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. |