Skip to main content
Glama

Canonicalize Tailwind classes

tailwind_canonicalize

Rewrite Tailwind CSS classes into their canonical short form. Turns arbitrary values back into real design tokens: p-[1rem] becomes p-4, rounded-[24px] becomes rounded-3xl, -bottom-[4px] becomes -bottom-1. Backed by 12,438 replacements generated from Tailwind 4.3.3's own design system, so the answers are authoritative rather than guessed. Handles one class at a time and does NOT merge across classes (px-4 py-4 into p-4, w-6 h-6 into size-6) — that needs the surrounding group to be safe to collapse; use NormWind for that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
classesYesA Tailwind class string, e.g. the contents of a class= attribute. Whitespace and unrecognized classes are preserved exactly.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesThe canonicalized class string.
changedYes
changesYes
tailwindVersionNo

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries full responsibility for disclosing behavior. It does so richly: one-class-at-a-time processing, no cross-class merging, authoritative replacement data from Tailwind 4.3.3, and preservation of whitespace/unrecognized classes via the schema. These traits go well beyond what the structured fields reveal.

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?

Every sentence pulls its weight: purpose, concrete examples, data authority, and the critical merging limitation. The core verb and resource are front-loaded, and the description is compact despite covering multiple examples and an alternative tool.

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?

For a single-parameter transformation tool with an output schema, the description is fully sufficient. It covers expected inputs, behavior, limitations, and alternative routing. No necessary information for an agent to call the tool correctly is 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?

The schema already documents the single `classes` parameter with 100% coverage, so the baseline is 3. The description adds value by illustrating valid input shapes (p-[1rem], rounded-[24px]) and by clarifying operational boundaries like 'one class at a time,' making the parameter's meaning more concrete than the schema alone.

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 opens with a specific verb and resource: 'Rewrite Tailwind CSS classes into their canonical short form.' Concrete examples (p-[1rem] becomes p-4) make the purpose unmistakable and differentiate it clearly from the sibling tool by focusing on canonicalization rather than merging.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use context and names an alternative: 'Handles one class at a time and does NOT merge across classes ... use NormWind for that.' This tells the agent exactly which capabilities are excluded and where to route class-merging requests.

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.

TDQS

A4.1/5.0
Disambiguation5/5

The two tools serve completely different purposes - one searches a catalogue of developer tools, the other canonicalizes Tailwind CSS classes. There is no possibility of confusing them.

Naming Consistency3/5

Both names use lowercase with underscores, but the pattern differs: 'lunarwerx_find_tool' follows company-prefix + verb_noun, while 'tailwind_canonicalize' follows product-prefix + bare verb. With only two tools, there is not enough of a consistent pattern to call it strong.

Tool Count3/5

Two tools is borderline. The find_tool is broad in scope while the Tailwind utility is narrow, making the server feel like an arbitrary pairing rather than a coherent collection.

Completeness2/5

The server lacks a unified domain; it offers one lookup tool and one code transformation tool. If intended as a LunarWerx surface, it is severely incomplete because only one actual utility is exposed alongside the meta-search.

Resources