Skip to main content
Glama

Set variable mode

figma_set_variable_mode
Idempotent

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.

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

NameRequiredDescriptionDefault
modeNoMode name or id, e.g. "Dark". Give this or `clear`.
clearNoRemove the pinned mode instead.
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
nodeIdsYes
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
collectionIdNo
collectionNameNoOr the collection's exact name.
idempotencyKeyNoCaller-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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (which only say mutation, idempotent, non-destructive), the description discloses the per-item result contract (`items: [{ id, ok, error? }]`) and that one failing item does not fail the whole call — critical partial-failure semantics. It also states the editor support matrix (Design supported; FigJam/Slides unverified), which annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The effect and its motivation are front-loaded, then clear semantics, then input identification, then the return shape and editor caveats — a logical order with little waste. The opening em-dash clause is slightly ornate for tool documentation but still earns its place by explaining the pin metaphor.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description supplies the return shape and partial-failure rule, and annotations cover the safety profile, so an agent can call this correctly. The one soft spot is that the collection is described as 'by id or name' while neither parameter is required in the schema, so the description doesn't resolve whether the collection is mandatory for disambiguation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, so the schema carries most of the load, but the description still adds meaning: mode may be given by name or id, the collection by id or name, and clear removes the pin so the node inherits again. It leaves `session`, `idempotencyKey`, and the stale-write `force` behavior to the schema, which documents them adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource (pin a variable mode on nodes) and immediately makes the effect concrete: frames, components, sections and pages pin a mode and their contents follow. That functional detail separates it from neighbors like figma_add_variable_mode (which defines a mode on a collection) and figma_set_variable_value without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear reason to reach for the tool — without a pin, a Dark mode can exist and still never render — and explains the `clear: true` inverse case. What's missing is an explicit when-not or a direct pointer to the sibling tools (add_variable_mode, set_variable_value) for adjacent tasks, so an agent must infer the boundary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools