Skip to main content
Glama
N-Link-Lab

design-tokens-mcp

by N-Link-Lab

Detect token drift in a CSS file

tokens_check_drift
Read-onlyIdempotent

Scans a CSS file for hardcoded hex colors and px values, comparing them to design tokens to identify mismatches and suggest fixes.

Instructions

Scan a CSS file for hardcoded hex colors and px values, and compare each against the design tokens. Values that exactly match a token are reported as 'matched'; values that match no token are reported as 'drift', each with the nearest token as a fix suggestion. Returns { checked_file, matched, drift: [{ value, line, kind, nearest_token, nearest_value }] }. Use this after editing styles to keep code and design tokens in sync.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
css_pathYesPath to the CSS file to scan
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds substantial behavioral details: it reports matched and drift items with line, kind, nearest_token, and nearest_value, going well beyond annotations.

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?

The description is concise: 3 sentences front-loaded with the main action, then output structure and usage recommendation. No redundant text.

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 one parameter fully described in schema, no output schema, the description provides a clear output structure. For a simple scanning tool, this is complete and informative.

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% (css_path described), so baseline is 3. The description does not add extra parameter details beyond the schema, such as path expectations or file format.

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?

The description explicitly states the action: scan a CSS file for hardcoded values and compare against design tokens. It clearly distinguishes from sibling tools (export, get, list, set) by focusing on drift detection.

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 description advises using this tool after editing styles to maintain sync, providing clear context for when to use it. It does not explicitly state when not to use it, but the guidance is sufficient.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/N-Link-Lab/design-tokens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server