Skip to content

v1.32.1 — Component docs resolve color token names

Choose a tag to compare

@tpitre tpitre released this 01 Jul 02:55

Fixed

figma_generate_component_doc was documenting colors as raw hex values — with a in the "Figma Variable" column — even when the component's fills and strokes were bound to variables, while spacing tokens documented correctly. Reported by Robin Di Capua, who noticed the generated Markdown listed hardcoded color values even though the same tokens surfaced by name when queried through the Company Docs MCP. It looked intermittent because any doc that had been hand-curated with a Color token section still showed names — masking that the generator never produced them.

Two root causes:

  1. The id→name lookup map was built by reading .id/.name off enrichment entries whose keys are actually variableId/variableName, so every color lookup missed and colors fell back to hex.
  2. Variable names were only ever sourced from the Enterprise-only REST /files/:key/variables/local endpoint (HTTP 403 on all other plans), so even a correct map would have been empty.

The generator now resolves variable names through the Desktop Bridge (Plugin API getLocalVariablesAsync), which works on every Figma plan, and threads that map through the States, Color Tokens, and Spacing sections alike. Bound colors now render real token names like color/content/default; spacing tokens that previously showed a raw VariableID:… now render spacing/1.

Also fixes the same .name vs variableName mismatch in the design-vs-code token-parity cross-reference, which was silently comparing undefined for every design token.

No new tools, no argument-shape changes, no plugin re-import required. Verified live against the Eventz Textarea component: 100/100 colors now resolve to token names (was 0/100). 1203 tests passing.

Full changelog: https://github.com/southleft/figma-console-mcp/blob/main/CHANGELOG.md#1321---2026-06-30