set_variable_value
Set or update a Figma variable's value for a specific mode by variable ID and mode ID or name, keeping design tokens consistent across modes.
Instructions
Set or update a variable value for a specific mode (by modeId or modeName).
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": {
"variableId": "<variableId>"
},
"name": "set_variable_value"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | Value (hex string for COLOR, number, string, boolean, or { aliasVariableId }) | |
| modeId | No | Target mode ID | |
| channel | No | Optional Figma document channel, fileKey, or documentName when multiple Figma files are open | |
| modeName | No | Target mode name e.g. Dark | |
| variableId | Yes | Target variable ID |