Skip to main content
Glama

Convert Design Tokens

convert_tokens

Convert design-tokens JSON into CSS variables, a Tailwind config, W3C tokens JSON, or Figma Tokens Studio JSON without an API key.

Instructions

Convert a design-tokens JSON object (colors, fontFamilies, fontSizes, fontWeights, spacing, radii, shadows) into CSS variables, a Tailwind config, W3C tokens JSON, or Figma (Tokens Studio) JSON. Deterministic, no API key needed.

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": {
      "tokens": "<tokens>"
    },
    "name": "convert_tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNocss
tokensYesTokens JSON string

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/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, and it does disclose two genuinely useful traits: the conversion is deterministic and requires no API key. It does not say what happens with malformed or unsupported token input, whether validation occurs, or how output is returned (string vs. file), leaving real behavioral gaps.

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 tight sentences: the primary conversion action and supported outputs come first, with the operational caveat (deterministic, no key) appended. No filler and nothing restated from 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?

For a simple two-parameter converter with no annotations and no output schema, the description is close but not complete: it never indicates the return shape (presumably the generated CSS/config text) or error behavior for invalid token JSON, which an agent needs to plan around.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50% (the 'format' enum has no per-value description), and the description compensates by expanding each enum value into its concrete artifact (CSS variables, Tailwind config, W3C tokens JSON, Figma JSON). It also enumerates the token categories expected inside the stringified 'tokens' JSON, which the schema does not state.

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 names a specific verb (convert) and resource (design-tokens JSON object) and enumerates the four concrete output formats: CSS variables, Tailwind config, W3C tokens JSON, and Figma/Tokens Studio JSON. That makes the scope unmistakable, though it never names the reverse-direction siblings (extract_tokens, extract_css_tokens) to draw an explicit boundary.

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: an agent can infer 'use this to translate tokens between formats,' and the 'no API key needed, deterministic' note helps it choose this over something that may require credentials. However, there is no explicit when-to-use/when-not guidance and no pointer to extract_tokens for the opposite direction.

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