Skip to main content
Glama
vitkuz573

tailwind-mcp

by vitkuz573

Check Tailwind colour contrast

tailwind_contrast
Read-only

Calculate WCAG contrast ratios for foreground and background colors, such as Tailwind theme tokens or CSS values, to check if text passes AA or AAA.

Instructions

Compute the WCAG contrast ratio of two colours and whether they pass AA or AAA. Colours may be theme tokens such as 'red-500' or 'white', or literal CSS colours.

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.
backgroundYesThe background colour, e.g. 'slate-900' or 'white' or '#fff'
foregroundYesThe text colour, e.g. 'white' or 'red-500' or '#333'

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 only declare readOnlyHint=true and openWorldHint=false, so the description must add more, and it does: it discloses that theme tokens ('red-500', 'white') are resolved as well as literal CSS colours, and since there is no output schema it names the return content (ratio plus AA/AAA verdict). It stops short of stating failure behaviour for unresolvable tokens.

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?

Two tight sentences, with the core operation front-loaded and the accepted input formats second. No filler, no repetition of the title, nothing that fails to earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 3-parameter read-only tool with full schema coverage, the description covers what the tool computes and what the result contains, which is enough in the absence of an output schema. Minor gaps remain around error handling for unrecognised colour tokens and whether the project parameter is honoured when resolving tokens.

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 100%, so the schema already documents foreground, background, and the project override with examples. The description's 'theme tokens such as red-500 or white, or literal CSS colours' largely restates what the parameter descriptions already say, so the 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?

States a specific verb and resource: 'Compute the WCAG contrast ratio of two colours' plus the pass/fail outcome. The purpose is unambiguous and clearly unlike any sibling (validate, theme, variants, migrate), but the description never names or contrasts a sibling, so it lands at the 'clear, no sibling differentiation' level.

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

Usage Guidelines2/5

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

The description gives no when-to-use guidance, no prerequisites, and no alternatives. It does not say whether this is meant for auditing a theme before shipping or spot-checking a pair of tokens, nor what to do if a token is not found in the project.

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