Skip to main content
Glama
vitkuz573

tailwind-mcp

by vitkuz573

Canonicalise a Tailwind class list

tailwind_canonicalize
Read-only

Rewrite Tailwind class lists into canonical form and order: convert arbitrary values to theme tokens, rename deprecated spellings, and sort classes like prettier-plugin-tailwindcss.

Instructions

Rewrite a class list into Tailwind's canonical form and order: arbitrary values that match a theme token become that token, deprecated spellings are renamed, and the classes are sorted the way prettier-plugin-tailwindcss would sort them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoAbsolute path to the project to inspect. Defaults to the server's working directory. Use it when the Tailwind project is not the current working directory.
candidatesYesThe class list to canonicalise, e.g. ['mt-[16px]', 'p-4', 'flex']

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description goes further by naming the exact transformations applied (token substitution, deprecated renames, prettier ordering). It stops short of noting that theme-token resolution depends on the project/config, which is the one behavioural caveat an agent would want.

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?

A single front-loaded sentence whose clauses each enumerate a distinct transformation, with zero filler. It is dense but every phrase earns its place; only the trailing 'the way prettier-plugin-tailwindcss would sort them' could be trimmed.

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?

With no output schema, the description should clarify the return shape, but it never says whether the canonicalised list comes back as a string or an array, nor whether anything is written to disk (readOnlyHint implies not). For a pure transformation tool that omission is the main completeness gap.

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 coverage is 100% and both parameters are documented in the schema, so the description is not required to carry parameter meaning. It adds only indirect context (the theme-token mention hints at why 'project' matters) and no format or syntax detail beyond the schema. Baseline 3 applies.

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?

Specific verb (rewrite/canonicalise) plus resource (a Tailwind class list) and three concrete transformations (arbitrary values to theme tokens, deprecated spellings renamed, prettier-plugin ordering). The only gap is that it never explicitly distinguishes itself from tailwind_migrate, which plausibly also rewrites class names.

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?

Usage is implied by the purpose: you reach for this when you have a class list that needs canonicalising or sorting. There is no explicit when-not guidance, no prerequisite statement (e.g. needing a Tailwind config to resolve theme tokens), and no routing to or away from siblings like tailwind_migrate or tailwind_validate.

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