Skip to main content
Glama
yhoyoex

OpenCode Figma MCP

by yhoyoex

create_variable

Creates a variable in a Figma collection and optionally sets its value. Use slash-separated names for grouping; RGBA colors use 0-1 components.

Instructions

Create a variable in a collection and optionally set its value. Use slashes in the name for grouping (e.g. "color/primary"). Colors use RGBA 0-1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesVariable name
valueNoOptional initial value: {r,g,b,a?} for COLOR, number for FLOAT, string for STRING, boolean for BOOLEAN, or {aliasOf: variableId}
modeIdNoOptional mode ID for the value (default: collection's default mode)
scopesNoOptional variable scopes, e.g. ["ALL_FILLS"], ["GAP"], ["CORNER_RADIUS"]
collectionIdYesID of the variable collection
resolvedTypeYesVariable type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that creation happens and a value is optionally set, but says nothing about conflict behavior, whether the created variable is returned, required permissions, or how name collisions 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?

Three tight sentences, front-loaded with the core action followed by two genuinely useful conventions (grouping slashes, RGBA range). No filler or redundancy.

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

Completeness3/5

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

Parameters are fully documented by the schema, but with no annotations and no output schema the description should say more about the mutation's effects and result. Behavior on name conflicts and the return value of the newly created variable are left unaddressed.

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 100%, so the schema already documents all six parameters, including RGBA 0-1 ranges and the aliasOf variant. The description reinforces the slash-grouping convention and RGBA range, but adds little beyond what the schema already states, landing at the baseline of 3.

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 gives a specific verb (create) and resource (variable in a collection) plus the optional value-setting behavior. It is clear what the tool does, though it does not explicitly contrast itself with close siblings like set_variable_value or create_variable_collection.

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?

It offers a practical naming convention (slashes for grouping) and a color format note, which is genuine guidance. However there is no explicit when-to-use / when-not-to-use statement and no routing to alternatives such as set_variable_value for updating an existing variable.

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