Skip to main content
Glama

set_variable_mode

Assigns a collection mode (e.g., Dark) to selected Figma frames or sections so the correct variables apply.

Instructions

Set which mode of a collection a frame/section uses (e.g. Dark).

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": {
      "nodeIds": "<nodeIds>",
      "collection": "<collection>",
      "mode": "<mode>"
    },
    "name": "set_variable_mode"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
modeYes
nodeIdsYes
collectionYes

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?

No annotations are supplied, so the description carries the full burden for a mutation tool. It does not say whether the mode applies to descendants, what happens to existing overrides, whether the operation errors when a mode name is invalid, or whether it is reversible.

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 wasted words, and the parenthetical example is genuinely informative. It is short to the point of under-specification, but not padded.

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?

For a 4-parameter mutation tool with no annotations, no output schema, and 25% schema coverage, the description leaves too much open. An agent could call it but would not know the failure modes or side effects.

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 only 25%, with just the file parameter documented. The description does compensate somewhat by clarifying that nodeIds refer to frames/sections and that mode belongs to the named collection, but it omits mode-name format, collection identifier form, and batching behavior for multiple nodeIds.

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?

Specific verb+resource: sets the mode of a variable collection applied to a frame/section, with a concrete example (Dark). It is clear enough to separate from bind_variable, though it never explicitly states that distinction.

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?

No guidance on when to use this versus bind_variable or set_properties, no prerequisites (e.g. the collection must already have modes defined), and no exclusions. The agent must infer usage entirely from the one-line purpose.

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