Skip to main content
Glama

WCAG Contrast Checker

media_contrast_check

Compute the WCAG 2.1 contrast ratio between a text and background color with pass/fail against every accessibility threshold: AA and AAA for normal and large text, plus the 3:1 UI-component minimum. Exact luminance math — the check every design system needs. Use this when an agent needs to contrast ratio + AA/AAA pass/fail. x402 price $0.01/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundYesBackground color
foregroundYesText color

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries full disclosure burden, and it does surface useful operational context: the paywalled x402 price ($0.01/call, USDC on eip155:8453) and the fact that it uses "exact luminance math." It is a pure computation with no side effects, so limited safety disclosure is needed, but it never states there is no auth/registration beyond payment.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Front-loaded with the core purpose, which is good, but contains filler ("the check every design system needs") and a redundant, malformed "Use this when..." sentence that duplicates the opening. The pricing clause is useful but tacked on, so the text is longer than its informational content warrants.

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 2-parameter compute tool with 100% schema coverage and no output schema, the description helpfully spells out what is returned (ratios plus AA/AAA/UI pass-fail verdicts) and discloses the payment requirement. It is largely complete, though accepted color input formats remain unstated.

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 foreground/background parameters are already documented in the schema. The description only echoes them as "text and background color" and adds no format guidance (hex vs rgb vs named colors), leaving the baseline 3.

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 and resource ("Compute the WCAG 2.1 contrast ratio between a text and background color") and enumerates the concrete outputs (AA/AAA for normal/large text plus 3:1 UI minimum). The purpose is unmistakably distinct from the nearest sibling media_color_convert, which only transforms colors rather than scoring accessibility.

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?

The sentence "Use this when an agent needs to contrast ratio + AA/AAA pass/fail" gestures at when-to-use but is grammatically broken and essentially restates the purpose rather than adding a decision rule. No when-not conditions or sibling alternatives (e.g. media_color_convert) are named, so usage is only implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources