Skip to main content
Glama

Get Variable Definitions

get_variable_defs
Read-only

Retrieve reusable variable definitions for a Figma node, such as color, font, size, and spacing tokens. Reads the node's current mode; omit nodeId to use the selection.

Instructions

Get variable definitions for a given node id. E.g. {'icon/default/secondary': #949494}. Variables and styles are reusable values applied to colours, fonts, sizes and spacings. Values resolve for the node's own mode. Read-only; with no nodeId it uses the selection. Use it for design tokens, and get_design_context for the layout. Without the plugin, a saved snapshot gives the raw values only, without names.

Input Schema

NameRequiredDescriptionDefault
nodeIdNoThe ID of the node, eg. "123:456" or "123-456" (instance ids like "I1:2;3:4" work too). Omit it to use the current selection in Figma.
fileKeyNoThe key of the Figma file. Accepted for compatibility; the file open in Figma Desktop is always used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the description is not the sole source of the safety profile. It goes beyond that by disclosing mode resolution ('Values resolve for the node's own mode') and the plugin-absent fallback ('a saved snapshot gives the raw values only, without names'), which is real behavioral context.

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?

Front-loads the verb+resource and the example, then layers behavior and routing. Every sentence contributes; it is a touch long but not padded.

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?

No output schema, but the inline example gives the return shape and the fallback/snapshot caveat is covered. Adequate for a zero-required-param read tool, though return scale or edge cases are not addressed.

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 100% and the schema already documents nodeId's selection default and fileKey's compatibility note. The description restates 'with no nodeId it uses the selection' rather than adding new meaning, so the baseline 3 is appropriate.

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?

States a specific verb+resource ('Get variable definitions for a given node id'), gives a concrete example of the returned shape, and explicitly distinguishes itself from get_design_context ('Use it for design tokens, and get_design_context for the layout'). An agent can select this tool over siblings without opening a schema.

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?

Names the use case ('for design tokens') and the alternative ('get_design_context for the layout'), plus the default behavior with no nodeId. It provides clear context but no explicit when-not-to-use beyond the single sibling routing.

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