Skip to main content
Glama

Validate DTCG tokens

designesy_tokens_score
Read-onlyIdempotent

Validate a DTCG design token file against the W3C 2025.10 spec to verify structural conformance. Runs 10 checks and returns PASS, FAIL, WARN, or SKIP with a 0-100 score.

Instructions

Validate a design token file against the W3C Design Tokens Community Group (DTCG) 2025.10 Final Community Group Report (the spec's first stable version, published Oct 28 2025 as a Candidate Recommendation and considered stable). Returns 10 conformance checks (t01-t10) with PASS, FAIL, WARN or SKIP. Use this to verify a tokens.json (or any DTCG token export) is structurally correct: $type/$value/$description present, structured colors (colorSpace + components rather than bare hex), a valid $schema pointer to designtokens.org, and correct dimension units. With 84% of teams now using design tokens (zeroheight Design Systems Report 2025, up from 56% in 2024) and the spec finally stable, every adopting team needs a validator. When NOT to use: for scoring a whole live site (not just its token file), use designesy_score. Executable: fetches the URL or parses the raw JSON you provide, runs 10 checks server-side. No browser needed. Score: PASS=1, WARN=0.5, FAIL=0, SKIP is not scored; points / scored checks x 100. Returns JSON: { contract_id, contract_version, contract_status, url, total_tokens, score (0-100), grade (A-F), pass_count, fail_count, warn_count, skip_count, scoring, checks[{id (t01-t10), name, status (PASS, FAIL, WARN or SKIP), detail}], provenance, validator_note }. Pass url to fetch a remote token file, or dtcg_file to validate an inline JSON string. Provide exactly one.

Input Schema

NameRequiredDescriptionDefault
urlNoURL to a DTCG token file (JSON). The tool fetches and validates it.
dtcg_fileNoRaw DTCG token JSON string to validate (alternative to url).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.13.8

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description goes well beyond them: it discloses the execution model ('fetches the URL or parses raw JSON you provide, runs 10 checks server-side, no browser needed'), the exact scoring formula, and the SKIP-is-unscored rule. That is substantive behavioral context an agent cannot get from the annotations.

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

Conciseness3/5

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

The purpose and NOT-to-use routing are front-loaded and the return-shape enumeration is valuable given no output schema. But the sentence about '84% of teams ... zeroheight Design Systems Report 2025' is marketing padding that does not help invocation, and the 'Candidate Recommendation and considered stable' clause is redundant with the already-stated 2025.10 Final report.

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

Completeness5/5

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

With no output schema, the description carries the return contract itself, listing every field (score, grade, checks[{id,status,detail}], etc.) and the scoring math. Combined with the parameter exclusivity rule and the sibling routing note, an agent has everything needed to call and interpret this correctly.

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 100%, so the two parameters are already documented; the description nonetheless adds the mutually-exclusive constraint ('Pass url ... or dtcg_file ... Provide exactly one') that the schema does not encode. It stops short of adding format expectations beyond the schema, so a 4 rather than a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Validate a design token file against the W3C DTCG ... spec') and immediately scopes it as 10 conformance checks on a token file. It explicitly differentiates itself from the sibling designesy_score, so an agent can route without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use ('verify a tokens.json or any DTCG token export is structurally correct') and an explicit when-not-to-use with the named alternative ('for scoring a whole live site, use designesy_score'). Nothing about selection is left to inference.

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