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
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | For FILL and STROKE: index of the paint (default 0) | |
| nodeId | Yes | ID of the node | |
| property | Yes | Property to bind (fill, stroke, corner radius, padding, spacing, width, height) | |
| variableId | Yes | ID of the variable |