Skip to main content
Glama
Figma Canvas MCP

Figma Canvas MCP

by AmroJSawan

figma_create_variable

Create one Figma variable with a name, collection ID, type (COLOR, FLOAT, STRING, BOOLEAN), and optional mode values; use it for single design-token setup and batch creation for multiple variables.

Instructions

Create a single Figma variable. For multiple variables, use figma_batch_create_variables instead (10-50x faster). Use figma_get_variables first to get collection IDs. Supports COLOR, FLOAT, STRING, BOOLEAN. Requires Canvas Bridge plugin.

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

Input Schema

NameRequiredDescriptionDefault
nameYesName for the new variable (e.g., 'primary-blue')
descriptionNoOptional description for the variable
collectionIdYesThe collection ID to create the variable in (e.g., 'VariableCollectionId:123:456'). Get this from figma_get_variables.
resolvedTypeYesThe variable type: COLOR, FLOAT, STRING, or BOOLEAN
valuesByModeNoOptional initial values by mode ID. Example: { '1:0': '#FF0000', '1:1': '#0000FF' }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.17.3

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavioral context: the plugin dependency, the order of operations for obtaining collection IDs, and which resolved types are permitted. It stops short of saying what is returned (e.g., the new variable's ID) or how duplicate names or empty valuesByMode are handled.

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?

Five short sentences with zero filler; the single-vs-batch routing constraint is front-loaded and the prerequisites follow in the order an agent would need them.

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?

Complete on inputs and prerequisites for a creation tool with no output schema, but it never indicates what the call returns or whether the created variable's ID is needed for follow-up update/rename calls, which is the one piece an agent would have to discover by trial.

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%, so all five parameters are already documented in the schema, including examples for name, collectionId, and valuesByMode. The description's mention of COLOR/FLOAT/STRING/BOOLEAN and collection IDs merely echoes the enum and schema text, adding no new semantics.

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 and resource ("Create a single Figma variable") and immediately bounds the scope to one variable, which cleanly separates it from the batch sibling.

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

Usage Guidelines5/5

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

Explicitly names the alternative for multi-variable work with a concrete justification (10-50x faster), and gives a prerequisite step (use figma_get_variables to obtain collection IDs) plus the Canvas Bridge plugin requirement.

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