figma_variable_modes
Sets the variable mode (light or dark) on a node to prevent design system variables from rendering as black. Applies to all variable collections by default, or to a specific collection with collectionName.
Instructions
Sets the variable mode (e.g. light/dark) on a node — required on every new artboard, or DS variables render as black. By default sets the mode on ALL variable collections at once (pass modeIndex only). Pass collectionName to target a single collection instead. Params: nodeId (required, typically the artboard), modeIndex (required, 0=default/light, 1=dark), collectionName (optional). Requires Phase 2.
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>",
"modeIndex": "<modeIndex>"
},
"name": "figma_variable_modes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Node ID (typically the artboard). | |
| modeIndex | Yes | Mode index. 0 = default/light, 1 = dark (if available). | |
| collectionName | No | Optional — variable collection name. Omit to set the mode on ALL collections at once (recommended). |