create_variables
Creates or updates variables in a Figma collection, including per-mode values and aliases, so designs can reuse consistent color, number, string, and boolean tokens.
Instructions
Create or update variables in a collection. values map mode name -> value: COLOR '#hex', FLOAT number, STRING string, BOOLEAN bool, or {"alias":"other/variable name"} (looked up in the same collection first; add "collection" to point elsewhere). A single value (not a map) applies to all modes. Existing variables with the same name are updated.
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": {
"collection": "<collection>",
"variables": "<variables>"
},
"name": "create_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Target file (fileKey, id or name). Defaults to the most recently active file. | |
| variables | Yes | ||
| collection | Yes | Collection name or id |