Skip to main content
Glama
viantonugroho11

@viantotech/mcp-storybook

find_token_drift

Detect hardcoded colors, spacing, radius, and font sizes in CSS/JSX that match design tokens, and suggest var(--token) replacements. Near matches are flagged as hints.

Instructions

Find hardcoded colors, spacing, radius, and font sizes in CSS/JSX that match design tokens, with var(--token) replacements. Near matches (tolerance > 0) are hints only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
remBaseNo
filenameNo
toleranceNo
categoriesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that near matches are advisory rather than actionable, and that exact matches yield concrete replacements, but it never states that this is a read-only static analysis, whether any limits or truncation apply to large inputs, or how the output is structured beyond the replacement hint.

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?

Two tight sentences with the core purpose front-loaded and the caveat about near matches placed second. No filler, though the parenthetical could be folded in more economically.

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?

No output schema and no annotations mean the description is the only context. It hints at the return shape (var(--token) replacements) and clarifies tolerance semantics, but omits the meaning of remBase, how filename affects results, and any input-size caveats, leaving gaps for a 5-parameter tool.

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 0% with 5 parameters, so the description must compensate. It partially does: the category names (colors, spacing, radius, font sizes) map onto the categories enum and it explains the tolerance parameter's effect, but remBase, filename, and code are left entirely undocumented.

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 (find) and resource (hardcoded colors, spacing, radius, font sizes in CSS/JSX) plus what it produces (var(--token) replacements). The purpose is unambiguous and distinguishable from get_design_tokens or validate_usage, though no sibling is named to sharpen the contrast.

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?

The second sentence gives interpretation guidance ('near matches with tolerance > 0 are hints only'), but that is about reading results, not about when to choose this tool over validate_usage or get_design_tokens. Usage is only implied from the purpose, with no explicit when/when-not or alternatives.

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