Skip to main content
Glama
LeoGCode

figma-reader-mcp

by LeoGCode

figma_get_variables

Extract Figma design variables (tokens) with collections, modes, aliases, and per-mode values, then output them as JSON, CSS custom properties, or W3C DTCG tokens.

Instructions

Design variables (tokens) with collections, modes, per-mode values and resolved aliases. Works on any plan (no Enterprise REST API). Formats: json (default), css (custom properties, extra modes as [data-collection=mode]), dtcg (W3C design tokens). A file that defines none answers empty in that format; figma_token_usage derives tokens from the raw values instead, and figma_get_styles reads the styles.

Input Schema

NameRequiredDescriptionDefault
fileYesA local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help)
formatNo
refreshNoExport the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help)
out_fileNoAlso write the result to this path. The answer then ends with a note, not written to the file: '(written to <path>; exportedAt <time>, account "<name>" (source: <source>))', or '(written to <path>; fileModifiedAt <time>)' for a local .fig
collectionNoOnly this collection name; a name no collection in the file has is an error listing the ones it has
css_prefixNo
include_remoteNoInclude library variables copied into the file (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.2
    • changedInput schema / properties / file / description
      Previous value: -"Path to a local .fig file, or a Figma file key / figma.com/design/... URL. A node-id in the URL is used when this tool takes node_id and it is omitted; a tool that answers about the whole file ignores it. A key or URL uses a local '<name> [<key>].fig' from FIGMA_FILES_DIRS when one exists, otherwise exports through the browser."New value: +"A local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help)"
    • changedInput schema / properties / out_file / description
      Previous value: -"Also write the result to this path"New value: +"Also write the result to this path. The answer then ends with a note, not written to the file: '(written to <path>; exportedAt <time>, account \"<name>\" (source: <source>))', or '(written to <path>; fileModifiedAt <time>)' for a local .fig"
    • changedInput schema / properties / refresh / description
      Previous value: -"Skip local/cached copies and export the live file through the browser. Has no effect when file is a path to a .fig: that file is read as it is on disk and the result carries refreshIgnored; pass the key or URL to export the live file instead."New value: +"Export the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help)"
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations are sparse (readOnlyHint=false, openWorldHint=true), so the description must carry behavior, and it does: it discloses empty-file behavior per format, that aliases are resolved, and that the output is format-dependent. It does not address the tension of a read-style tool carrying readOnlyHint=false nor any caching/permission constraints, which is the remaining gap.

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?

Three dense sentences, front-loaded with the resource and its scope before moving to formats and sibling routing. Every clause carries information; the only cost is slight packing of multiple facts per sentence.

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?

There is no output schema, and the description compensates by naming the three output formats and their conventions plus the written-note behavior on out_file. For a 7-parameter read tool this is close to complete, with only auth/rate-limit and error-shape detail unaddressed.

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 71%, but the description adds genuine meaning the schema lacks: it explains each 'format' enum value (json default, css custom properties with extra modes emitted as [data-collection=mode], dtcg = W3C design tokens) and reinforces the empty-result case. That materially improves an agent's ability to pick and use parameters.

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 the exact resource and its shape ('design variables (tokens) with collections, modes, per-mode values and resolved aliases'), which tells an agent precisely what it will receive. It explicitly names the two neighbors it is not—figma_token_usage (derives tokens from raw values) and figma_get_styles (reads styles)—so it is distinguishable without opening any 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?

Gives a real precondition ('Works on any plan (no Enterprise REST API)') and routes away from siblings by stating what each alternative does. It falls short of an explicit 'use this when you want X, use that when you want Y' rule, but the context is clear enough for selection.

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