Skip to main content
Glama

bind_variable

Bind a Figma variable to node properties like fill, stroke, width, padding, radius, opacity, or text settings to control design values consistently through variables.

Instructions

Bind a variable to node properties. field: 'fill' | 'stroke' (paint color) or any bindable node field: width, height, itemSpacing, counterAxisSpacing, paddingTop/Right/Bottom/Left, cornerRadius, topLeftRadius..., strokeWeight, opacity, visible, characters, fontSize, fontFamily, fontStyle, fontWeight, lineHeight, letterSpacing, minWidth, maxWidth... 'padding' and 'cornerRadius' bind all sides.

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": {
      "nodeIds": "<nodeIds>",
      "field": "<field>",
      "variable": "<variable>"
    },
    "name": "bind_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
fieldYes
nodeIdsYes
variableYesVariable name or id
collectionNoDisambiguate by collection name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full burden of behavioral disclosure but says nothing about overwriting existing bindings, whether the variable must already exist, permission requirements, idempotency, or what happens on unsupported fields. The field enumeration adds some behavioral context about accepted values, but the mutation semantics remain undocumented. For a binding tool that alters node state, this is a significant gap.

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?

The purpose is front-loaded in the first clause, followed by the field specification. The long enumeration of field names is dense but necessary because the schema provides no enum or description for `field`. There is little wasted wording, though the list is slightly unwieldy.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutation tool with no annotations, no output schema, and only 60% schema description coverage, the description should disclose at least what happens on success/failure and whether existing bindings are replaced. It covers the target field vocabulary well but omits binding lifecycle behavior and reference to the `file` and `collection` parameters. It is not complete enough for an agent to reason about side effects.

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 60%, and critically the schema gives no description at all for `field`, so the description compensates by enumerating valid field values and explaining that 'padding' and 'cornerRadius' bind all sides. It also clarifies that fill/stroke refer to paint color. It adds little about nodeIds, variable, or collection beyond the schema, but the field elaboration is substantive and goes beyond structured data.

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 states a specific verb and resource: bind a variable to node properties. It enumerates the bindable fields extensively, so an agent can see exactly what class of property is targeted. It does not name or differentiate itself from siblings, so it stops short of a 5.

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 exclusions, and no mention of alternatives such as create_variables or set_variable_mode. The usage is only implied by the verb 'bind' and the field list, leaving the agent to infer prerequisites and routing.

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