Skip to main content
Glama
Takeaki0817

TalkToFigma

by Takeaki0817

create_variable

Create a variable within a Figma collection by specifying its name, data type, and optional per-mode values for design token management.

Instructions

Create a variable inside a collection, optionally seeding per-mode values. COLOR values are { r, g, b, a } (0-1). Get modeIds from get_variables or create_variable_collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the variable (use slashes to group, e.g. "color/primary")
collectionIdYesThe ID of the variable collection to create the variable in
resolvedTypeYesThe resolved data type of the variable
valuesByModeNoMap of modeId -> value. For COLOR use { r, g, b, a } (0-1); FLOAT a number; STRING a string; BOOLEAN a boolean.
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. It discloses the optional per-mode seeding and color format, but does not mention side effects, return value, permissions, or behavior if the variable already exists. For a mutating operation, this is insufficient transparency.

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?

Two concise sentences, front-loaded with the primary action and followed by essential parameter guidance. Every sentence earns its place with no wasted words.

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?

Schema covers parameter semantics well, and the description provides necessary usage context. However, with no annotations and no output schema, the agent is left without information about return values or error conditions, making it moderately complete for a creation tool.

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 covers all parameters, so baseline is 3. The description adds value by explaining 'per-mode values' as the purpose of valuesByMode and directing the agent to get modeIds from specific tools, which is beyond the schema's generic 'Map of modeId -> 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 the action and resource: 'Create a variable inside a collection'. It differentiates from sibling tools like create_variable_collection (which creates a collection) and get_variables (which retrieves modeIds).

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?

Provides clear usage context by instructing to get modeIds from get_variables or create_variable_collection, which is essential when using valuesByMode. It implies this is the tool for creating variables but does not explicitly contrast with alternatives.

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/Takeaki0817/figma-local-bridge'

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