Add variable mode
figma_add_variable_modeAdd a mode, such as Dark, to a Figma variable collection and return its modeId, so you can assign per-mode variable values.
Instructions
Add a mode (e.g. "Dark") to a variable collection; returns its modeId. Modes beyond the first need a paid plan — on a Starter file Figma refuses, and its message is returned. Then set values per mode with figma_set_variable_value. Editors: Design; unverified: FigJam, Slides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| collectionId | Yes | ||
| 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. |