Skip to main content
Glama
FigeloMCP
by mmonzera

create_variable

Create a design token variable (COLOR, FLOAT, STRING, or BOOLEAN) inside a Figma collection and assign optional mode values to organize reusable design values.

Instructions

Create a design token variable (COLOR, FLOAT, STRING, BOOLEAN) inside a collection with optional mode values.

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": {
      "collectionId": "<collectionId>",
      "name": "<name>",
      "resolvedType": "<resolvedType>"
    },
    "name": "create_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesVariable name e.g. color/bg/primary
channelNoOptional Figma document channel, fileKey, or documentName when multiple Figma files are open
collectionIdYesTarget variable collection ID
resolvedTypeYes
valuesByModeNoMap of modeId or modeName to value (hex string for COLOR, or { aliasVariableId })

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure but says little beyond implying a creation operation. It does not explain defaults when valuesByMode is omitted, handling of invalid collections or modes, whether creation is immediate, or what result is returned.

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?

A single front-loaded sentence communicates the action, resource, supported types, target, and optional mode values without filler. Its brevity does not introduce ambiguous or redundant wording.

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 five-parameter mutation with a nested valuesByMode object, no annotations, and no output schema, the description leaves several invocation-relevant behaviors unspecified. The schema supplies much of the basic syntax, but the definition lacks operational context, failure behavior, and result expectations.

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?

The schema already documents most parameters, including the channel, collection target, name example, and mode-value formats. The description adds limited meaning by framing resolvedType as design-token types and valuesByMode as optional mode initialization, but otherwise largely repeats structured information.

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 clearly states the verb and resource: creating a design-token variable of four supported types inside a collection, optionally with mode values. It does not explicitly distinguish this operation from siblings such as create_variable_collection, set_variable_value, or batch_create.

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

Usage Guidelines3/5

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

The wording implies use when initializing a variable within a collection, including optional mode-specific values. It provides no explicit selection criteria, prerequisites, or guidance on when to use a sibling for creating collections, binding variables, or setting values later.

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