Skip to main content
Glama

Check token drift

check_token_drift

Detect hardcoded hex colors and px values in a code snippet, then suggests the matching or nearest design token to prevent drift.

Instructions

Does this code drift from the token system? Scans a snippet for hardcoded hex colors and px values and suggests the matching or nearest token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNo
snippetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
findingsYes
Behavior3/5

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

No annotations are provided, so the description must convey behavior. It states the scan targets (hex colors, px values) and the suggestion of matching or nearest token. It does not discuss edge cases such as no matching token, language support, or that the operation is read-only, leaving 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?

The description is a single, efficient sentence that gets straight to the point. It avoids redundancy and front-loads the core question.

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 tool has a clear purpose and an output schema, but the description omits the meaning of the 'lang' parameter and lacks details about failure/fallback behavior. For a tool with only 2 parameters and no annotations, this is adequate but not complete.

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

Parameters2/5

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

The description explains 'snippet' implicitly, but 'lang' is entirely unexplained. The schema provides no descriptions, and the enum values (css, jsx, text) lack context for why lang matters, which is a significant gap.

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 uses a specific verb ('Scans') and identifies the resource ('a snippet') and the action ('suggests the matching or nearest token'). It clearly differentiates from sibling tools like list_tokens or get_token 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 question format 'Does this code drift from the token system?' establishes a clear use case. However, it doesn't explicitly mention when not to use this tool or point to alternatives like list_tokens, though the sibling context makes the distinction implicit.

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/jtrainer357/ds-canon'

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