Skip to main content
Glama
aiexp1

Tanod MCP server

utilpeek: convert a color and check WCAG contrast

convert_color_check_contrast
Read-onlyIdempotent

Convert a CSS color between hex, RGB, HSL and OKLCH, and check its WCAG contrast against an optional background for AA/AAA pass or fail.

Instructions

utilpeek: Convert a color between hex, RGB, HSL and OKLCH and check WCAG contrast. For contrast alone use check_wcag_contrast. Returns a CSS color (hex, rgb(), hsl() or a CSS name) as hex, rgb, hsl, hsv, naive cmyk, OKLCH and WCAG relative luminance; with a background, the WCAG 2.x contrast ratio and AA / AAA pass or fail for normal and large text and UI components (unrounded: #777 on white is 4.48:1 and fails AA). An unparseable or out-of-range color is a 422 before any payment (not charged). A translucent color is composited over the background before the contrast is computed. Typically under 0.1 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. Docs: https://tanod.dev/learn/color-contrast-checker-api.html

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYesA CSS color: hex (#rgb, #rgba, #rrggbb, #rrggbbaa), rgb() / rgba(), hsl() / hsla() or a CSS color name (148 names, plus transparent).
backgroundNoOptional second color (e.g. the background): adds the WCAG 2.x contrast ratio and AA / AAA pass / fail.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
contrastNo
backgroundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive). The description adds real operational context beyond them: unparseable/out-of-range colors return 422 before any charge, translucent colors are composited over the background before contrast is computed, typical latency under 0.1 s, price USD 0.001, and a free tier of 10 calls per IP per UTC day.

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?

Purpose and the sibling alternative are front-loaded, followed by outputs, edge-case behavior, and pricing/logistics. Dense but every sentence conveys distinct, actionable information with no filler.

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?

Even though an output schema exists, the description summarizes the return shape, error semantics, compositing behavior, latency, and pricing. Nothing an agent needs to invoke this 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?

Schema coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining what supplying `background` actually does (adds the WCAG 2.x ratio, AA/AAA pass/fail for normal/large text and UI components) and how translucency interacts with it, which the schema description only states tersely.

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 compound verb+resource: converting a color across four formats and checking WCAG contrast. It explicitly distinguishes itself from the sibling check_wcag_contrast ('For contrast alone use check_wcag_contrast'), so an agent can route correctly without opening a schema.

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?

Names the alternative tool and the exact condition that selects it ('For contrast alone'). Combined with the behavior when `background` is omitted, the agent knows precisely when to pick this tool over its sibling.

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

Deploy Server

Other Tools