bind_variable
Bind a Figma variable to a node property (fills, strokes, dimensions, spacing, typography) to enable design tokens and dynamic updates.
Instructions
Bind a variable to a node property. property 'fills' or 'strokes' binds the first solid paint's color (setBoundVariableForPaint). Other properties (width, height, cornerRadius, top/bottom/left/right radius, padding*, itemSpacing, counterAxisSpacing, strokeWeight, opacity, min/maxWidth, min/maxHeight, and text fields fontSize/fontWeight/lineHeight/letterSpacing/paragraphSpacing/paragraphIndent) use node.setBoundVariable. Variable type must match the property.
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
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | The ID of the node to bind the variable to | |
| property | Yes | The property to bind: 'fills', 'strokes', or a bindable field name (e.g. width, height, cornerRadius, paddingLeft, itemSpacing, opacity, fontSize, lineHeight) | |
| variableId | Yes | The ID of the variable to bind |