Skip to main content
Glama

create_variable

Create a new variable within a Figma variable collection, specifying its name and type. After creation, use set_variable_value to assign a value.

Instructions

Create a variable in an existing collection.

No value is set here — use set_variable_value after. Returns {data: {id}}.

Examples: create_variable({collection: "VariableCollectionId:1:2", name: "Theme/bg", type: "COLOR"}) create_variable({collection: "VariableCollectionId:1:2", name: "spacing/md", type: "FLOAT"})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionYesVariableCollectionId to create the variable in
nameYesVariable name (slashes denote hierarchy in the Figma UI)
typeYesVariable type
Behavior3/5

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

No annotations exist, so description carries full burden. It discloses creation in existing collection, no value set, and return format {data: {id}}. However, it omits error conditions, idempotency, or permission requirements, leaving some behavioral gaps.

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?

Description is three sentences plus two examples, front-loaded with the main purpose. Every sentence adds value, no redundancy. Examples are compact and illustrative.

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 simple creation tool with three fully-described parameters, the description covers purpose, post-creation step, and return value. Lacks details on error handling or permissions, but is reasonably complete given the tool's simplicity and absence of output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with all three parameters documented. Description adds value beyond schema by explaining that slashes in name denote hierarchy in Figma UI and provides concrete examples with different types. This extra context pushes the score above baseline.

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?

Description clearly states 'Create a variable in an existing collection' with specific verb and resource. It further distinguishes from sibling 'set_variable_value' by noting that no value is set here, and provides examples demonstrating usage.

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?

Description explicitly says to use set_variable_value after creation, providing clear when-to-use guidance. It does not mention alternatives like ensure_variable, but the directive is sufficient for a well-scoped tool.

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/musepy/genable'

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