Skip to main content
Glama
elsahafy
by elsahafy

extract_figma_styles

Extract design tokens (colors, typography, effects) from a Figma file via REST API, normalize, and load into the active token store using a Figma Personal Access Token.

Instructions

Extract design tokens (colors, typography, effects) from a Figma file via the Figma REST API. Normalizes tokens and loads them into the active token store. Requires a Figma Personal Access Token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idsNoOptional specific node IDs to extract. If omitted, extracts all published styles.
figma_patYesFigma Personal Access Token for API access. Not stored or logged. Generate at figma.com/developers/api#access-tokens
namespaceNoOptional prefix for extracted token CSS variables (e.g., 'figma' produces --figma-color-primary)
figma_file_keyYesThe Figma file key (alphanumeric ID from the file URL, e.g., 'abc123XYZ')
merge_strategyNoHow to handle conflicts with existing tokensreplace

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it discloses that a Personal Access Token is required, that extraction goes through a remote REST API, and that tokens are normalized and written into the active token store (a mutating side effect). It still omits what happens to pre-existing tokens when merge_strategy is left at its default and any rate-limit/error behavior.

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 short sentences, purpose front-loaded, no filler. The final auth sentence partially duplicates the figma_pat schema description, which keeps it just short of ideal.

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?

Covers source, destination, auth, and normalization for a 5-parameter tool with no annotations. The main gap is that no output schema exists and the description never indicates what the call returns or how success/failure is reported.

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 description coverage is 100%, so all five parameters are already documented in the schema, including the PAT, the namespace prefix, and the merge_strategy enum. The description adds nothing beyond 'Requires a Figma Personal Access Token', which the schema already states, so the baseline 3 applies.

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?

States a specific verb (extract) and resource (design tokens: colors, typography, effects), names the source (Figma REST API) and the destination (active token store). This clearly separates it from generic token siblings, though it never explicitly contrasts itself with import_design_tokens.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no exclusions, and the obviously related sibling import_design_tokens is never referenced. The agent must infer that this tool is the Figma-specific path and that other importers cover other sources.

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