create_variable
Create a design variable/token in Figma by providing its name, collection, and value, with optional type and per-mode overrides.
Instructions
Create a design variable/token.
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": {
"name": "<name>",
"collectionId": "<collectionId>",
"value": "<value>"
},
"name": "create_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Variable name (e.g. "primary-500", "spacing-md") | |
| type | No | Variable type | |
| value | Yes | Value (hex for COLOR, number for FLOAT, etc.) | |
| modeValues | No | Values per mode: { "Light": "#000", "Dark": "#fff" } | |
| collectionId | Yes | Collection ID |