Skip to main content
Glama

Design drift check

check_design_drift
Read-only

Compare design tokens from the design tool with what the code uses. Pass design (W3C design tokens JSON, Tokens Studio JSON, flat key/value JSON, or CSS variables) and code (CSS, SCSS or a Tailwind theme with custom properties or hex values). Both are parsed forgivingly. Returns findings grouped by severity with a count summary: design tokens missing from code, code tokens missing from design, same name with a different value (color distance in deltaE, px and rem normalized at 16px), different names with identical values (rename candidates), near-duplicate colors inside the code (deltaE under 2), hard-coded values in code that equal a token exactly, and values that are close to but not exactly a token, naming the token. No AI, nothing stored.

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": {
      "design": "<design>",
      "code": "<code>"
    },
    "name": "check_design_drift"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesCSS, SCSS or Tailwind theme text from the codebase.
designYesDesign tokens: W3C or Tokens Studio JSON, flat key/value JSON, or CSS variables.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare a safe read-only, closed-world operation; the description goes well beyond by disclosing forgiving parsing, the full taxonomy of findings, severity grouping with counts, deltaE color distance, px/rem normalization at 16px, and the deltaE<2 near-duplicate threshold. The closing 'No AI, nothing stored' is a useful non-obvious guarantee.

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?

Front-loaded with the comparison, then the input contract, then the return shape. The long finding-type enumeration is dense but earns its place because there is no output schema to carry it; sentence economy is good with only minor redundancy between the input description and the schema.

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 and two fully-described parameters, the description supplies exactly what is missing: what the findings look like, how they are grouped, and the normalization rules behind the comparisons. An agent can decide to call it and interpret the result without further guessing.

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 baseline is 3; the description adds value by enumerating the concrete input variants (W3C, Tokens Studio, flat JSON, CSS variables for design; CSS/SCSS/Tailwind for code) and noting that parsing is forgiving, which is semantics the schema does not carry. It adds meaning but not per-parameter edge cases.

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 — compare design tokens against what the code actually uses — which is more precise than a generic 'check'. It doesn't name a sibling (e.g. compare_token_sets, audit_token_scales) to deflect ambiguous cases, so it falls short of a 5, but the purpose is unambiguous on its own.

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

Usage Guidelines4/5

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

The two required inputs and their accepted formats make the use case clear: you have exported design tokens and you have code text. There is no explicit when-not guidance or named alternative among the many token-related siblings, so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources