Skip to main content
Glama

Get variables and their values

figma_get_variable_defs
Read-only

Retrieve Figma design token values across all local collections or only variables and styles a given node subtree uses, including per-mode values, aliases, and scopes.

Instructions

Design tokens with their VALUES. Without nodeId: every local collection (modes, default mode, key) and variable with values per mode name ("#1a2b3c80", "16", "true", "alias:color/blue/500" — strings, as figma_set_variable_value takes them), scopes, codeSyntax, key and description; paginated. With nodeId (a frame, a screen, a page): only the variables and styles that subtree USES, library ones included — variables { name: value resolved for that node, so a Dark frame reads Dark }, styles { name: value line }, and details with ids, keys and code syntax. Variables work on any plan; modes beyond the first are paid-only. Editors: Design; unverified: FigJam, Slides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax variables (file-wide list). Default 500.
cursorNoThe nextCursor of a truncated call, unchanged.
nodeIdNoRead the tokens this subtree uses instead of the file-wide list.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
maxNodesNoNodes walked with `nodeId`. Default 2000.
collectionIdNoOnly this collection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/no-destructive, but the description adds substantial behavior beyond them: the exact shape of returned values (per-mode strings like '#1a2b3c80', 'alias:color/blue/500'), pagination behavior, plan limits ('modes beyond the first are paid-only'), and editor support coverage. This is unusually rich for a read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The front-loaded 'Without nodeId / With nodeId' split is the right structure and the key distinction leads. It is dense and semicolon-heavy, bordering on run-on, but nearly every clause carries information an agent needs.

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

Completeness5/5

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

With no output schema, the description must carry the return-shape burden, and it does — describing variables, styles and details payloads for the nodeId path and per-mode values for the file-wide path. Nothing an agent needs to select and invoke the tool correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema — it clarifies that nodeId accepts 'a frame, a screen, a page' and that values come back in the string form figma_set_variable_value consumes. This enriches interpretation of nodeId and the value contract rather than merely restating it.

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 opens with a precise verb+resource ('Design tokens with their VALUES') and immediately splits the tool into two clearly-scoped behaviors — file-wide collection listing vs. subtree-usage resolution. An agent can tell what the tool returns, though it never names sibling tools like figma_get_library_variables to sharpen the boundary.

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?

It gives explicit conditional guidance: 'Without nodeId: every local collection...' and 'With nodeId (a frame, a screen, a page): only the variables and styles that subtree USES.' That is clear when-to-use context tied to the parameter. It stops short of naming alternatives or exclusions, so a 5 isn't warranted.

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