Skip to main content
Glama
bourhaouta

tailwindshades-mcp

Convert a color

convert_color
Read-onlyIdempotent

Converts any CSS color into Tailwind-formatted oklch(), hex, and rgb values, mapping each into its correct gamut. Use for a single color; call generate_palette to build full shades.

Instructions

Converts any CSS color to oklch(), hex and rgb, formatted like Tailwind (oklch() is what Tailwind v4 uses). Colors outside a format are mapped into it: oklch() to Display P3 like Tailwind's palette, hex and rgb to sRGB. Use it for one value; to add a color with all its shades, call generate_palette instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYesAny CSS color: hex (#db4d53), rgb(), hsl(), oklch() or a named color

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hexYese.g. #db4d53
rgbYese.g. rgb(219, 77, 83)
oklchYese.g. oklch(61.6% 0.177 21.62)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-open-world), and the description goes further by disclosing gamut behavior: out-of-format colors are mapped into Display P3 for oklch and sRGB for hex/rgb. That is real behavioral context beyond structured fields, though it does not mention precision, casing of hex output, or error behavior for unparseable input.

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?

Three compact sentences, front-loaded with the purpose and output formats before the routing advice. The parenthetical asides about Tailwind v4 are slightly chatty but still informative and not wasteful enough to drop it below a 4.

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?

An output schema exists, so return values need no explanation, and the description still covers the format, the gamut-mapping semantics, and the alternative tool. Nothing an agent needs to invoke this single-argument tool correctly is missing.

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?

Only one parameter and schema description coverage is 100%, so the schema already documents the accepted color syntaxes (hex, rgb(), hsl(), oklch(), named). The description's 'any CSS color' adds no syntax detail beyond that, so the baseline of 3 applies.

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?

States a specific verb (converts) and resource (any CSS color) and names the exact output formats (oklch(), hex, rgb) with the Tailwind framing. It also explicitly distinguishes itself from the sibling generate_palette, so an agent can route correctly without opening schemas.

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?

Gives an explicit scope rule ('use it for one value') plus the alternative and the condition that selects it ('to add a color with all its shades, call generate_palette instead'). This is exactly the when/when-not/alternative structure the dimension rewards.

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