Skip to main content
Glama
elsahafy
by elsahafy

import_design_tokens

Import design tokens from Figma Tokens JSON, Style Dictionary, or CSS custom properties into the active token store to style components generated by generate_component.

Instructions

Import design tokens from Figma Tokens JSON, Style Dictionary, or CSS custom properties into the active token store. Imported tokens are used by generate_component for styling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatYesFormat of the provided token data
namespaceNoOptional prefix for all imported tokens (e.g., 'brand' produces --brand-color-primary)
tokens_jsonYesRaw JSON string of design tokens. Supports Figma Tokens, Style Dictionary, or flat CSS custom properties format.
merge_strategyNoHow to handle conflicts with existing tokens. 'replace' clears all. 'merge-overwrite' overwrites conflicts. 'merge-keep' keeps existing.replace

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the destination store and the downstream consumer, but says nothing about whether the import mutates/overwrites existing tokens, permission needs, or failure behavior for invalid JSON; the merge semantics live only in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste, and the core action plus destination are front-loaded before the downstream-use note. Nothing is padded or redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the definition should disclose more about side effects and results. Parameters are well covered by the schema, but the lack of any indication of overwrite risk, auth requirements, or return shape leaves a meaningful gap.

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 the schema already documents all four parameters including the merge_strategy enum values and the namespace example. The description adds no syntax or format detail beyond what the schema provides, so 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 (Import) and resource (design tokens) and names the three supported source formats plus the destination (active token store). It is clear what the tool does, though it does not explicitly contrast itself with the related sibling extract_figma_styles, which an agent could easily confuse with this tool.

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

Usage Guidelines3/5

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

Usage is only implied: the agent can infer this is the tool for bringing external token data in, and the description notes the downstream consumer (generate_component). There is no explicit when-to-use guidance and no exclusion versus extract_figma_styles or clear_tokens/export_tokens.

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