Skip to main content
Glama

bind_variable

Bind a FLOAT, BOOLEAN, or STRING variable to a Figma node property like fontSize or paddingTop. Automatically matches Tablet/Mobile modes for responsive designs.

Instructions

Bind a FLOAT, BOOLEAN, or STRING variable to a node property.

prop is a flat Figma bindable field (e.g. fontSize, itemSpacing, paddingTop, cornerRadius, opacity, visible, width, height, characters). Shorthands: gap → itemSpacing, padding → paddingTop, corner → cornerRadius, font-size → fontSize.

COLOR variables are NOT bound here — they live inside Paint objects. To apply a color token, specify it at the source instead: • At creation: jsx <frame bg="$TokenName" ...> or fill="$TokenName" • Post-hoc: set_fill({node, bg: "$TokenName"}) or set_stroke

When selecting which variable to bind: if the node is a Tablet or Mobile variant (name or variant property contains "Tablet"/"Mobile"), match the node's property value against the Tablet/Mobile mode column from list_variables — not Desktop.

Examples: bind_variable({node: "1:2", prop: "fontSize", variable: "VariableID:1:6"}) bind_variable({node: "1:3", prop: "paddingTop", variable: "VariableID:1:7"}) bind_variable({node: "1:4", prop: "visible", variable: "VariableID:1:8"}) bind_variable({node: "1:5", prop: "characters", variable: "VariableID:1:9"})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeYesNode ID (e.g. "1:2")
propYesFlat Figma bindable field (fontSize, paddingTop, itemSpacing, visible, characters, etc.). COLOR props (fills/strokes) not supported — use set_fill/jsx.
variableYesVariableID to bind (FLOAT/BOOLEAN/STRING only)
Behavior4/5

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

No annotations provided, so description must carry the burden. It discloses that COLOR variables are not bound here and explains workarounds, plus mode selection logic. However, it does not mention that binding is a mutating operation or any required permissions, which would improve transparency.

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?

Well-structured: starts with main action, then details props, color exclusion, mode selection, and ends with examples. Every sentence adds unique value with no redundancy.

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?

Covers major aspects: supported types, prop list, color exclusion, mode selection, and examples. Lacks description of return value (e.g., success/error), but for a simple binding tool this is acceptable. Overall complete given complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all three parameters with descriptions, but the description adds significant value: lists example prop values, shorthands (gap→itemSpacing), exclusions (colors), and context for mode selection. This goes well beyond the schema.

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?

The description clearly states the tool binds FLOAT/BOOLEAN/STRING variables to node properties, lists supported properties (e.g., fontSize, paddingTop), and explicitly excludes COLOR variables with references to set_fill/set_stroke. This distinguishes it well from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use (binding non-color variables) and when-not-to-use (color variables, with alternative tools named). Also gives mode selection guidance for Tablet/Mobile variants, helping agents choose the correct mode column from list_variables.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/musepy/genable'

If you have feedback or need assistance with the MCP directory API, please join our Discord server