Skip to main content
Glama
Tanod MCP Server

Tanod MCP Server

Official

convert_color_check_contrast

Read-onlyIdempotent

Convert CSS colors between hex, RGB, HSL, and OKLCH, and check WCAG contrast against a background to see AA/AAA pass or fail for text and UI components.

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

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "color": "<color>"
    },
    "name": "convert_color_check_contrast"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorYesA CSS color: hex (#rgb, #rgba, #rrggbb, #rrggbbaa), rgb() / rgba(), hsl() / hsla(), oklch(), oklab(), lab(), lch(), color(srgb|display-p3|rec2020) or a CSS color name (148 names, plus transparent).
backgroundNoSecond color (e.g. the background): adds the WCAG 2.x contrast ratio and AA / AAA pass / fail.

Output 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.4

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds substantial behavior beyond that: translucent colors are composited over the background before contrast is computed, an unparseable or out-of-range color returns 422 before any charge, latency is typically under 0.1 s, price is USD 0.001, and there are 10 free 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose, alternative routing, and output shape are front-loaded in the first two sentences, with operational details after. The prose is dense but nearly every clause carries information; the latency note ("typically under 0.1 s") is the one marginal addition, and the return-value enumeration borders on redundant given the output schema exists.

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 two-parameter conversion/contrast tool this is thorough: accepted input formats, contrast behavior, alpha compositing, failure mode (422 pre-charge), and pricing/free-tier limits are all covered. The return shape is spelled out even though an output schema already exists, which is redundant but not harmful.

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 baseline is 3, but the description adds meaning the schema does not: `background` specifically triggers the WCAG 2.x ratio plus AA/AAA pass/fail for normal text, large text, and UI components, and notes the unrounded value behavior (#777 on white is 4.48:1, fails AA). It also clarifies how a translucent `color` interacts with `background`.

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 ("convert a color between hex, RGB, HSL and OKLCH") plus the second capability ("check WCAG contrast"), and explicitly names the sibling check_wcag_contrast as the narrower alternative, so an agent can distinguish the two without opening either 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?

It states the routing condition directly: "For contrast alone use check_wcag_contrast," and explains that supplying `background` is what activates contrast/AA/AAA evaluation. When-to-use and when-to-use-the-alternative are both explicit.

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