Set variable mode
figma_set_variable_modePin a variable collection mode to frames, components, sections, or pages so Dark or Light displays inside them, or clear the pin to restore default inheritance.
Instructions
Show nodes in a chosen mode of a collection — Dark on this screen, Light on that one: frames, components, sections and pages pin a mode, and everything inside follows. Without it every node uses the collection's default mode, so a Dark mode can be created and valued and still never be seen. clear: true removes the pin (the node inherits again). The collection by id or name, the mode by name or id. Returns per-item results: items: [{ id, ok, error? }] — one item failing does not fail the call. Editors: Design; unverified: FigJam, Slides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Mode name or id, e.g. "Dark". Give this or `clear`. | |
| clear | No | Remove the pinned mode instead. | |
| nodeIds | Yes | ||
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| collectionId | No | ||
| collectionName | No | Or the collection's exact name. | |
| 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. |