Skip to main content
Glama

design_tokens

Generate design tokens for named themes, custom OKLCH palettes, CSS formats, or Tailwind configs to standardize UI styling.

Instructions

Generate design tokens. Select action: theme (named theme or genre), custom (OKLCH paper/accent + fonts), css (vanilla/CSS Modules/SCSS/variables-only), or tailwind (complete tailwind.config.js).

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": {
      "action": "<action>"
    },
    "name": "design_tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
genreNoGenre for theme action (ignored if theme_name is set)
styleNoDesign system slug for css/tailwind actions (e.g. glass, minimal, material)
actionYesToken generation mode
formatNoOutput format for css action
paletteNoColor palette for css/tailwind actions
paper_cNoCustom paper chroma (0-50)
paper_hNoCustom paper hue (0-360)
paper_lNoCustom paper lightness (0-100)
accent_cNoCustom accent chroma (0-50)
accent_hNoCustom accent hue (0-360)
accent_lNoCustom accent lightness (0-100)
font_bodyNoBody font stack for custom action
font_monoNoOptional mono font stack for custom action
last_themeNoPrevious theme name for diversification
theme_nameNoNamed theme for theme action: Specimen|Atelier|Newsprint|Studio|Manifesto|Brutal|Terminal|Midnight|Bloom|Aurora|Cobalt|Coral|Hum|Garden|Sport|Carnival
last_accentNoPrevious accent hue for diversification
font_displayNoDisplay font stack for custom action

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It never says whether generation is side-effect free or writes files to a project, what happens to existing token files, whether the tailwind action emits config text or persists it, or what the caller receives back. For a generator with four modes and 17 parameters, that is a significant disclosure gap.

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 purpose before the action list, with no filler. Minor ambiguity: 'vanilla/CSS Modules/SCSS/variables-only' is presented inside prose without being flagged as the 'format' enum, so the reader must map it back to the schema.

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?

The description adequately covers action selection for a 17-parameter tool, and the 100% schema coverage handles individual parameters. What is missing is output expectations and side effects, which matter here because there is no output schema and no annotations to fall back on.

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 every parameter, including action applicability ('Genre for theme action', 'Output format for css action'). The description adds a useful grouping that ties parameter clusters to each action (paper/accent + fonts for custom, format for css), but it does not explain values the schema leaves implicit, such as direction of the last_theme/last_accent diversification inputs.

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 and resource ('Generate design tokens') and then enumerates the four generation modes, so an agent knows exactly what the tool produces. It does not differentiate itself from nearby siblings such as 'palette', 'list_themes', or 'detect_genre', which an agent could easily confuse with the 'theme' action.

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?

The 'Select action:' clause gives useful routing guidance among the tool's own modes, with parentheticals hinting at when each applies (named theme vs. custom OKLCH vs. CSS output vs. tailwind config). However, there is no guidance on when to use this tool versus the sibling tools that also deal with themes and palettes, and no stated prerequisites or exclusions.

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