Skip to main content
Glama
lostpunk
by lostpunk

set_variable

Destructive

Update a local Figma COLOR or FLOAT variable in its default mode or a specified modeId. Use it to change token values; bound layers follow Figma variable behavior.

Instructions

Update one local COLOR (#RRGGBB) or FLOAT token in its default mode or specified modeId. Bound layers follow Figma variable behavior; specimen value captions may need updating separately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
modeIdNo
variableIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.4

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this is a destructive write (readOnlyHint false, destructiveHint true, openWorldHint false). The description adds that the tool updates only local tokens in a given mode, and that bound layers follow Figma variable behavior, which is useful behavioral context beyond the annotations. It does not detail permission requirements or rate limits, but the added caveats are valuable.

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?

Two concise sentences, front-loaded with the core action and scope, followed by a useful caveat. No wasted words and appropriate length for the tool's complexity.

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

Completeness3/5

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

The description covers the core mutation and a follow-up note, but with no output schema and no parameter descriptions in the schema, it should provide more detail about the variableId parameter and any expected return or error behavior to be fully complete for an agent.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for three undocumented parameters. It only explains that value is a COLOR or FLOAT and that modeId selects a mode, but does not clarify the format or role of variableId. This leaves a significant gap for an agent to construct a valid call.

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 (Update), resource (local token/variable), and scope (default mode or specified modeId). It also names the allowed data types (COLOR #RRGGBB or FLOAT), clearly distinguishing it from sibling tools that operate on nodes or pages.

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?

The description implies usage for changing token values and notes a follow-up for bound layers and specimen captions. It does not explicitly state when not to use this tool versus alternatives like update_node, but the domain is specific enough that an agent can infer.

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