Skip to main content
Glama

Export tokens in a build format

export_tokens
Read-only

Emit design tokens in consumable formats like CSS, Tailwind, Swift, Android, Figma, or JSON to generate theme-ready variables for app and design tooling.

Instructions

Emit tokens in a consumable format. Each format documents its supported scopes, projections and consumer verification obligations; CSS is the complete runtime token artifact.

Input Schema

NameRequiredDescriptionDefault
themeNoOnly for the "json" format, which is single-theme.
formatYescss: CSS custom properties for every theme and density. The canonical runtime artefact — everything else is generated for tooling that cannot consume CSS. | scss: Sass variables plus theme mixins, for pipelines that still compile Sass. | dtcg: DTCG 2025.10 JSON: palette/alpha, four semantic themes, spacing, radius, typography and durations. Fluid typography uses its minimum size with original CSS preserved in extensions; other CSS-only scales are not represented. | tailwind-v4: Tailwind CSS v4 @theme inline block; utilities resolve tokens at the element, including nested theme roots. | tailwind-v3: Tailwind CSS v3 JavaScript config object. | js: Plain ES module exporting a nested token object. | ts: TypeScript module with literal types, so token names are checked at compile time. | swift: UIKit token source: semantic colors (light/dark and increased contrast) and spacing at a 16-point rem baseline. No component or full typography parity; native compilation is consumer-verified. | android: Android resource sections: all semantic colors including alpha, light/dark modes and spacing at a 16-dp rem baseline. Split into the named files. High-contrast modes, components and native compilation are consumer-owned. | figma: Tokens Studio for Figma JSON, with one token set per theme. | json: Flat resolved key/value JSON for one theme. The simplest thing to consume programmatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.2.1
    • changedInput schema / properties / format / description
      Previous value: -"css: CSS custom properties for every theme and density. The canonical runtime artefact — everything else is generated for tooling that cannot consume CSS. | scss: Sass variables plus theme mixins, for pipelines that still compile Sass. | dtcg: W3C Design Tokens Community Group JSON. The interchange format for design tools and token pipelines. | tailwind-v4: Tailwind CSS v4 @theme block mapping tokens to utility namespaces. | tailwind-v3: Tailwind CSS v3 JavaScript config object. | js: Plain ES module exporting a nested token object. | ts: TypeScript module with literal types, so token names are checked at compile time. | swift: Swift extension with UIColor values resolved per theme, for iOS. | android: Android colors.xml plus dimens.xml, with a values-night variant for dark. | figma: Tokens Studio for Figma JSON, with one token set per theme. | json: Flat resolved key/value JSON for one theme. The simplest thing to consume programmatically."New value: +"css: CSS custom properties for every theme and density. The canonical runtime artefact — everything else is generated for tooling that cannot consume CSS. | scss: Sass variables plus theme mixins, for pipelines that still compile Sass. | dtcg: DTCG 2025.10 JSON: palette/alpha, four semantic themes, spacing, radius, typography and durations. Fluid typography uses its minimum size with original CSS preserved in extensions; other CSS-only scales are not represented. | tailwind-v4: Tailwind CSS v4 @theme inline block; utilities resolve tokens at the element, including nested theme roots. | tailwind-v3: Tailwind CSS v3 JavaScript config object. | js: Plain ES module exporting a nested token object. | ts: TypeScript module with literal types, so token names are checked at compile time. | swift: UIKit token source: semantic colors (light/dark and increased contrast) and spacing at a 16-point rem baseline. No component or full typography parity; native compilation is consumer-verified. | android: Android resource sections: all semantic colors including alpha, light/dark modes and spacing at a 16-dp rem baseline. Split into the named files. High-contrast modes, components and native compilation are consumer-owned. | figma: Tokens Studio for Figma JSON, with one token set per theme. | json: Flat resolved key/value JSON for one theme. The simplest thing to consume programmatically."
  2. Changed1 schema field changedv2.1.0
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description is consistent with that. It adds genuine context that output varies by format in supported scopes, projections and consumer verification obligations (e.g., native compilation is consumer-owned), but it never states what the call actually returns or whether anything is written to disk despite the word "emit".

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?

Two short sentences, front-loaded with the action and followed by the one useful framing fact about format heterogeneity. The middle clause ("projections and consumer verification obligations") is jargon-heavy but does convey that formats differ in fidelity.

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?

With no output schema and 11 output formats, the description should say what an export returns (a string, a file set, per-theme artefacts) and whether theme is required or ignored per format. The theme constraint lives only in the schema, leaving a real gap for a tool whose whole purpose is producing differently shaped output.

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% and the format enum descriptions are unusually rich, so the schema already carries the parameter semantics. The description adds only a framing claim that each format documents its own scope; it contributes no meaning about format values or the theme parameter beyond what the schema states.

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?

"Emit tokens in a consumable format" gives a specific verb (emit/export) and resource (tokens/design tokens), and the title clarifies it is a build-format export. It does not name the closely related sibling get_tokens or get_stylesheet, so an agent must infer the boundary between raw token retrieval and export.

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: "CSS is the complete runtime token artifact" and the schema's note that everything else exists "for tooling that cannot consume CSS" suggest css as the default and other formats as targeted alternatives. There is no explicit statement of when to call this instead of get_tokens, nor any prerequisite or selection rule in the description itself.

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