Skip to main content
Glama

Set variable value

figma_set_variable_value
Idempotent

Set 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

TableJSON Schema
NameRequiredDescriptionDefault
valueYesThe value for the declared type: "#1a2b3c" for COLOR, "16" for FLOAT, "Inter" for STRING, "true" for BOOLEAN.
modeIdNo
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
variableIdNoe.g. "VariableID:1:2".
variableNameNoOr its full name, e.g. "color/bg/default".
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

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=true, and destructive=false, so the bar is lower. The description adds real behavioral context beyond them: modeId defaults to the collection's first mode, the alias syntax creates references to other variables, and it discloses editor support ("Design; unverified: FigJam, Slides"), which is genuinely useful platform-scope information.

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?

Three tight sentences, front-loaded with the core action, then value formats, then mode behavior, then environment notes. Every sentence carries operational information, though the editor-support clause reads slightly as an addendum.

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 mutation tool with no output schema, the description covers the value syntax per type, the mode default, aliasing, and editor scope. It does not state failure conditions or whether the target variable must already exist, leaving minor gaps.

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 83% (above the 80% baseline), yet the description still adds meaning the schema lacks: modeId accepts an id OR a name and defaults to the first mode, and the "alias:..." value form is documented only here, not in the schema.

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

Purpose4/5

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

States a specific verb and resource ("Set a variable's value") and adds a scope qualifier ("in one mode") that meaningfully separates it from figma_create_variable and figma_set_variable_properties. It does not explicitly name any sibling, so it falls just short of a 5.

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

Usage Guidelines3/5

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

The value-format and mode-default details imply how to call the tool, but there is no explicit when-to-use/when-not guidance and no routing to alternatives such as figma_set_variable_properties or figma_bind_variable_to_node. Usage is inferred rather than stated.

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