Skip to main content
Glama
vola-trebla

tailwind-context-resolver-mcp

by vola-trebla

validate_class_string

Validate Tailwind CSS class strings against your project's actual config to catch hallucinated design tokens before writing code. Returns valid, invalid, and uncertain classes with conflict warnings.

Instructions

Validates a Tailwind CSS className string against the project's actual config. Returns valid_classes, invalid_classes (hallucinated tokens), possibly_valid_classes (plugin-generated — cannot verify without PostCSS), and conflict warnings. Handles variants (hover:, dark:, lg:), important (!), opacity modifiers (/50), negative values (-mt-4), and arbitrary values ([32rem]). Use to catch hallucinated design tokens before writing code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
config_pathYesAbsolute path to tailwind.config.js or tailwind.config.ts
class_stringYesSpace-separated Tailwind class string to validate
Behavior5/5

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

With no annotations provided, the description carries the full burden and does exceptionally well. It details the return structure (valid/invalid/possibly_valid classes, conflict warnings), discloses the limitation that plugin-generated classes cannot be verified without PostCSS, and lists supported syntax (variants, important, opacity modifiers, negative values, arbitrary values). This is comprehensive behavioral disclosure.

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 two sentences with zero filler. The first sentence packs functionality, output categories, and supported syntax; the second sentence gives a clear directive. Every phrase contributes, and the structure is front-loaded with the core verb and resource.

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?

Despite lacking an output schema, the description explains the return values and limitations, covers a wide range of class syntax edge cases, and gives a concrete usage scenario. It is complete for a validation tool of this complexity, and no critical behavioral detail appears to be missing.

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% for both parameters, so the baseline is 3. The description adds value by explaining the accepted syntax for class_string (variants, important, opacity modifiers, negative values, arbitrary values), which goes beyond the schema's simple 'space-separated' definition. It does not add meaning to config_path, but the overall parameter semantics are enhanced.

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 clearly states the tool validates a Tailwind CSS className string against the project's config, and it distinguishes itself from sibling tools by focusing on class string validation rather than config summaries or theme resolution. It also enumerates specific outputs (valid_classes, invalid_classes, possibly_valid_classes, conflict warnings), making the purpose unmistakable.

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?

It explicitly gives a use case: 'Use to catch hallucinated design tokens before writing code.' This provides clear when-to-use context, but it does not explicitly mention when not to use it or direct users to alternatives, which is a minor omission given the single-purpose nature of the tool.

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/vola-trebla/tailwind-context-resolver-mcp'

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