Set variable value
figma_set_variable_valueSet or update a Figma variable's value for a specific mode, with support for color, number, text, boolean, and variable aliases.
Instructions
Set a variable's value in one mode. value is a string: "#1a2b3c" for COLOR, "16" for FLOAT, text for STRING, "true"/"false" for BOOLEAN, or "alias:color/brand" to point at another variable of the same type. modeId takes a mode id or name and defaults to the collection's first mode. Editors: Design; unverified: FigJam, Slides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The value for the declared type: "#1a2b3c" for COLOR, "16" for FLOAT, "Inter" for STRING, "true" for BOOLEAN. | |
| modeId | No | ||
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| variableId | No | e.g. "VariableID:1:2". | |
| variableName | No | Or its full name, e.g. "color/bg/default". | |
| idempotencyKey | No | Caller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely. |