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
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | A local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help) | |
| format | No | ||
| refresh | No | Export the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help) | |
| out_file | No | 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 | |
| collection | No | Only this collection name; a name no collection in the file has is an error listing the ones it has | |
| css_prefix | No | ||
| include_remote | No | Include library variables copied into the file (default true) |