Skip to main content
Glama
FigeloMCP
by mmonzera

set_variable_value

Set or update a Figma variable's value for a specific mode by variable ID and mode ID or name, keeping design tokens consistent across modes.

Instructions

Set or update a variable value for a specific mode (by modeId or modeName).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "variableId": "<variableId>"
    },
    "name": "set_variable_value"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueNoValue (hex string for COLOR, number, string, boolean, or { aliasVariableId })
modeIdNoTarget mode ID
channelNoOptional Figma document channel, fileKey, or documentName when multiple Figma files are open
modeNameNoTarget mode name e.g. Dark
variableIdYesTarget variable ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden and does not meet it. It never says whether this overwrites an existing value, whether the node bindings that reference the variable are updated as a side effect, whether the value type must match the variable's resolved type, what permissions or Figma channel state are needed, or whether the change is undoable.

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?

A single front-loaded sentence with no filler and the mode scoping folded into a parenthetical. It is efficient, though the brevity comes at the cost of content that the contextual-completeness dimension penalizes rather than this one.

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

Completeness2/5

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

A five-parameter mutation tool with no annotations and no output schema needs more than one sentence. Missing are mutation semantics (overwrite behavior), type-compatibility rules between value and the target variable, the meaning of the optional channel parameter when multiple Figma files are open, and what the call returns on success or failure.

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 coverage is 100%, so the input schema already documents value, modeId, modeName, channel, and variableId, including value type variants. The description's only addition is the modeId/modeName either-or relationship, which is minor; the schema does the heavy lifting, so the baseline 3 applies.

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?

The description uses a specific verb ('Set or update') against a specific resource ('a variable value') and adds the scoping dimension (mode via modeId or modeName). An agent can distinguish this from create_variable or bind_variable at a glance, though the description never names those siblings to sharpen the boundary.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing states whether this requires the variable to already exist, when to prefer modeId over modeName, or how it differs from siblings like create_variable or bind_variable. The parenthetical 'by modeId or modeName' implies an either-or choice but does not explain the conditions that select one.

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