Skip to main content
Glama

create_variable

Creates a variable in a Figma collection. Requires name, collection ID, and resolved type (BOOLEAN, FLOAT, STRING, COLOR). Use set_variable_value to set per-mode values.

Instructions

Create a variable in a collection. resolvedType is BOOLEAN / FLOAT / STRING / COLOR. Use set_variable_value to populate per-mode values. Returns { ok, variableId, name }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesVariable name, e.g. "color/primary"
collectionIdYesVariable collection id
resolvedTypeYes
Behavior3/5

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

Annotations already indicate a non-destructive write operation. The description adds the return format '{ ok, variableId, name }' and specifies that 'resolvedType' must be one of the enum values. It does not disclose potential errors or behavior if the collection doesn't exist, but the added details are useful.

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 highly concise with just two sentences and a return structure, each sentence delivering essential information. No filler or redundancy.

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?

The description covers the creation purpose, required resolvedType, and directs to the sibling tool for populating values. It lacks details on error scenarios or prerequisites (e.g., collection must exist), but for a simple creation tool, the information is largely sufficient.

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 67%, with schema descriptions for 'name' and 'collectionId' but not for 'resolvedType'. The description compensates by listing the enum values (BOOLEAN, FLOAT, STRING, COLOR). It adds no new meaning for the other parameters, resulting in marginal added value.

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 'Create a variable in a collection,' using a specific verb and resource. It distinguishes from the sibling tool 'set_variable_value' by directing users to use that tool to populate per-mode values after creation.

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 explicitly advises using 'set_variable_value' to populate per-mode values after creation, providing clear follow-up guidance. While it doesn't list alternatives or exclusions, the mention of a sibling tool offers helpful context for usage.

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