Skip to main content
Glama

add_variable_mode

Add a mode (such as Dark) to a Figma variable collection. Returns the new mode's ID and name, and provides fallback guidance when the file's plan blocks adding more modes.

Instructions

Add a mode (e.g. "Dark") to a variable collection. Returns { ok, modeId, name }. Mode count is gated by the file's Figma plan (Starter allows 1 per collection) — when the plan blocks a new mode this fails with guidance: fall back to a paired collection (e.g. "Color/Dark") holding the same variable names with that theme's values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesMode name, e.g. "Dark"
collectionIdYesVariable collection id
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses the return format, the plan-gating behavior (Starter allows 1 per collection), and the failure guidance. This adds significant behavioral detail that annotations don't capture, though it doesn't mention potential edge cases like duplicate mode names.

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 concise yet information-dense: it states what the tool does, what it returns, and how it behaves under plan constraints. No filler words; each sentence earns its place. Well-structured for AI consumption.

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 two-parameter tool with no output schema, the description covers the action, return value, and a key failure mode. It doesn't explicitly state prerequisites like collection existence or name uniqueness, but the core usage is sufficiently complete. A minor gap, hence 4.

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%, with both parameters (name and collectionId) having descriptions. The tool description adds only a minor example ("Dark") that repeats the name parameter's schema description, but does not add new meaning beyond the schema. 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 clearly states the tool's action: 'Add a mode (e.g. "Dark") to a variable collection.' This is a specific verb+resource that distinguishes it from sibling tools like create_variable_collection or set_variable_value, and even includes the return shape for additional clarity.

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 provides clear context for when to use the tool (when adding a mode to a variable collection) and includes a specific alternative guidance: when the plan blocks a new mode, fall back to a paired collection. While it doesn't explicitly enumerate exclusions, it offers a practical when-not-to and alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/awdr74100/figwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server