Skip to main content
Glama
the-real-talk

the-real-talk

bind_variable

Binds design variables to Figma node properties such as fill, stroke, padding, corner radius, spacing, width, or height, so color and float values update consistently across a design system.

Instructions

Bind a variable to a node property: FILL, STROKE, CORNER_RADIUS, PADDING (all four sides) or PADDING_TOP / PADDING_BOTTOM / PADDING_LEFT / PADDING_RIGHT (one side), CORNER_TOP_LEFT / CORNER_TOP_RIGHT / CORNER_BOTTOM_LEFT / CORNER_BOTTOM_RIGHT (one corner), ITEM_SPACING, WIDTH or HEIGHT. FILL and STROKE need a COLOR variable, the others a FLOAT variable.

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>",
      "variableId": "<variableId>"
    },
    "name": "bind_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexNoFor FILL and STROKE: index of the paint (default 0)
nodeIdYesID of the node
propertyYesProperty to bind (fill, stroke, corner radius, padding, spacing, width, height)
variableIdYesID of the variable

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/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, and it does disclose a meaningful validation constraint: which variable type each property requires, including the PADDING vs PADDING_TOP single-side distinction. It says nothing about whether an existing binding is replaced, whether the operation is idempotent, what errors occur on type mismatch, or what is returned.

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?

Two dense sentences, front-loaded with the action, followed by the property/scoping taxonomy and the type rule. The long enum listing is somewhat redundant with the schema, but it is organized by category rather than dumped as a flat list.

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?

The tool is a simple 4-parameter mutation with no output schema and no annotations; the description covers the main correctness risk (property/variable type mismatch) and the property scoping nuances. Remaining gaps are replace-vs-add behavior on an already-bound property and failure modes.

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 actually adds semantics the schema's terse enum description lacks: it groups the corner and padding variants by scope (all four sides, one side, one corner) and ties variableId's expected type to the chosen property. The index parameter's meaning is left to the schema.

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?

The description names a specific verb and resource ('Bind a variable to a node property') and enumerates the exact property targets, going well beyond a tautology. It stops short of differentiating itself from siblings like bind_variable_batch or bind_variable_field, so an agent must infer which of those is the right entry point.

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?

Usage is implied by the per-property enumeration and the type pairing rule (FILL/STROKE need COLOR, the rest need FLOAT), which effectively tells the agent when binding will succeed. However, there is no explicit statement about when to use this tool versus bind_variable_batch or rebind_variable_usages, and no prerequisites are given.

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