Skip to main content
Glama

Export design tokens

export_tokens
Read-only

Convert brand colors, type scale, spacing, radius, and shadows into ready-to-paste CSS variables, Tailwind v4 @theme tokens, or W3C DTCG JSON; each color gets a 50–950 scale.

Instructions

Turns brand colors (plus a type scale, spacing, radius and shadows) into ready-to-paste tokens: CSS variables, a Tailwind v4 @theme block, or W3C Design Tokens (DTCG) JSON. Each color becomes a 50–950 scale.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "colors": "<colors>"
    },
    "name": "export_tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
fontsNoE.g. {"sans": "\"Inter Variable\", sans-serif"}
colorsYesColor name → hex, e.g. {"primary": "#3b82f6", "neutral": "#64748b"}
formatNotailwind
shadowColorNo#0f172a
spacingBaseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already mark it readOnly and not open-world, so an agent knows it is a safe computation. The description adds useful behavior the annotations do not: the described 50-950 scale generation per color and the output shape for each format. It does not say what happens if a color is invalid or how scales are generated.

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?

It is one compact sentence plus a follow-up, with the formats front-loaded. It wastes little, although the parenthetical list of extra inputs is slightly dense.

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?

There is no output schema, so the description must describe returns, and it only partly does, by naming formats. With five parameters, nested objects, and low schema coverage, it should say more about spacingBase, shadowColor, and fonts. It is enough to call the tool, not enough to call it well.

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 only 40 percent. The description names the format choices (CSS variables, Tailwind v4 @theme, DTCG JSON), which helps map the 'format' enum. But it says nothing about shadowColor, spacingBase, or the fonts object, so the low-coverage parameters remain unclear.

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?

The description states a concrete verb and resource: it turns brand colors and scales into tokens in three named output formats. It is clear what it produces. It does not explicitly name a sibling alternative, but the word 'export' separates it from generators like make_palette or type_scale.

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 implied: bring colors (and optionally type/spacing/radius/shadows) and pick a format. There is no explicit 'use this instead of X' guidance and no statement of prerequisites or limits. That is adequate but thin.

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