Skip to main content
Glama

Set variable properties

figma_set_variable_properties
Idempotent

Change what a token carries besides its value: name (one variable only), scopes, codeSyntax ("" removes a platform), description, hiddenFromPublishing — on many variables at once, by id or exact name.

Instructions

Change what a token carries besides its value: name (one variable only), scopes, codeSyntax ("" removes a platform), description, hiddenFromPublishing — on many variables at once, by id or exact name. Scopes are checked against each variable's own type. Values per mode: figma_set_variable_value. Returns per-item results: items: [{ id, ok, error? }] — one item failing does not fail the call. Editors: Design; unverified: FigJam, Slides.

Input Schema

NameRequiredDescriptionDefault
nameNoRename — only when one variable is targeted.
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.
scopesNoWhich property pickers offer it. [] hides a primitive that is only aliased; semantic tokens name their fields, e.g. ["FRAME_FILL","SHAPE_FILL"] or ["GAP"]. Checked against the type; ALL_SCOPES stands alone. Default (omitted): Figma's ALL_SCOPES.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
codeSyntaxNoThe name in code per platform, e.g. { "WEB": "var(--color-bg-brand)" }. "" removes that platform.
descriptionNo
variableIdsNoGive this or `variableNames`.
variableNamesNoExact full names, e.g. "color/bg/brand".
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.
hiddenFromPublishingNoHide it when the file is published as a library.

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 annotations, it discloses partial-failure behavior (`one item failing does not fail the call`), the per-item return shape, scope validation against variable type, editor support (`Design`; unverified `FigJam, Slides`), and the special empty-string behavior for `codeSyntax`. These are meaningful operational details not supplied by the annotation flags.

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?

The description is front-loaded with purpose, then constraints, return behavior, and environment notes. Despite covering many parameters, it remains a compact paragraph with no filler sentences.

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

Completeness5/5

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

For a 10-parameter mutation tool with no output schema, the description supplies the missing return semantics (per-item results), partial-failure behavior, targeting rules, and the key alternative for values. Remaining fields such as `force` and `idempotencyKey` are thoroughly covered by schema descriptions.

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 90%, so the schema already documents nearly every parameter in detail. The description adds only light context—`name` is single-variable, scopes are type-checked, and `codeSyntax` empty string removes a platform—most of which is already reflected in the schema descriptions, so the baseline 3 is appropriate.

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: changing non-value variable properties (`name`, `scopes`, `codeSyntax`, `description`, `hiddenFromPublishing`). It explicitly distinguishes itself from `figma_set_variable_value` by saying values per mode belong to that sibling, so an agent can select the right tool without opening the schema.

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 clearly identifies the tool’s scope—non-value variable properties—and names `figma_set_variable_value` for per-mode values, which is the main adjacent alternative. It also constrains targeting to ids or exact names and notes `name` works on only one variable, though it does not enumerate exclusions against creation or deletion tools.

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