Skip to main content
Glama

Add variable mode

figma_add_variable_mode
Idempotent

Add 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

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
collectionIdYes
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. First observedv0.1.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly=false, destructive=false, idempotent=true), but the description adds real behavioral context beyond them: the paid-plan gating rule, the fact that Figma's own refusal message is surfaced, the returned modeId, and the editor support matrix (Design; unverified FigJam/Slides). This is well above the lower bar set by the annotations.

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

Conciseness5/5

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

Front-loads the core action and return value, then adds plan gate, follow-up tool, and editor support in tight clauses. No sentence is filler and none repeats structured data verbatim.

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?

For a 4-param mutation with no output schema, the description covers the return value, plan prerequisite, error behavior, and next step, so an agent can call it correctly. The only remaining gap is the undocumented collectionId/name semantics.

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

Parameters3/5

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

Schema description coverage is only 50% (session and idempotencyKey are documented; name and collectionId are not). The description mentions the target collection and the mode name example "Dark" but adds no format, uniqueness, or identifier semantics for the undocumented required parameters. With half the parameters bare in the schema, the description does not fully compensate.

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?

States a specific verb (Add) and resource (a mode to a variable collection), names the counterpart operation in the title, and discloses the return value (modeId). It is clearly distinguishable from sibling tools like figma_set_variable_mode, figma_update_variable_collection, and figma_create_variable_collection.

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?

Gives concrete context: modes beyond the first require a paid plan, Starter files are refused with the message returned, and the follow-up step is routed explicitly to figma_set_variable_value. It also documents supported editors. It stops short of naming a when-not alternative beyond the plan gate, so it is a strong 4 rather than a 5.

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