Skip to main content
Glama

Bind variable

figma_bind_variable_to_node
Idempotent

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…

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

NameRequiredDescriptionDefault
fieldYese.g. "fill", "radius", "gap", "padding", "effect.color", "fontSize".
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
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. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover idempotency and non-destructiveness, and the description adds meaningful behavior beyond them: gradients/images are refused (not replaced), text fields may be refused per item, and the call returns per-item results so one failure doesn't fail the batch. It does not restate the safety profile, adding real context.

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

Conciseness3/5

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

Front-loaded with the core action and otherwise dense with useful detail, but the single semicolon-chained sentence is run-on and harder to parse than a structured list of field categories would be. Information earns its place, but the structure is not optimal.

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?

With no output schema, the description compensates by documenting the return shape `{ updated, items: [{ id, ok, error? }] }` and per-item failure behavior. Editor support (Design vs unverified FigJam/Slides) is also noted, leaving little an agent needs missing.

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 significantly enriches `field` with a full enumeration of bindable properties and explains how `index` selects the paint/effect/grid and that paints must be SOLID. This adds value beyond the schema's example-only field description.

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 (bind) and resource (variable/design token to a node property), plus the consequence ('so it follows the variable'). This clearly positions it against siblings like figma_set_fills or figma_set_opacity, which set a value rather than bind 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?

Routes the agent to figma_get_variable_defs for library variable ids and to figma_update_style for tokens inside a style, which is explicit alternative guidance. It lacks a crisp 'when not to use this vs setting a raw value' exclusion, but the routing cues are strong.

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