Skip to main content
Glama

Check WCAG Text Contrast

check_contrast

Evaluate foreground/background hex color contrast ratios against WCAG AA and AAA, with an option to flag large text, to verify accessible color pairings.

Instructions

Evaluate opaque foreground/background hex color ratios against WCAG AA and AAA; specify largeText for large type.

Input Schema

NameRequiredDescriptionDefault
pairsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations exist, so the description carries the burden. It does disclose two useful behaviors: only opaque colors are supported (no alpha compositing) and both AA and AAA thresholds are evaluated. However it never says what the caller receives back (raw ratio numbers vs. per-level pass/fail) and does not mention the 100-pair batch ceiling, leaving real gaps for a zero-annotation tool.

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?

A single tight sentence with the core action front-loaded and the largeText hint trailing. No filler, no repetition of the title.

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

Completeness3/5

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

With no annotations, no output schema, and 0% schema coverage, the description should anchor the return shape and the batch limits. It covers the input semantics adequately and the opacity constraint, but an agent still cannot predict the response structure or the 100-pair cap without reading the schema.

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 0%, so the description must compensate; it partially does by establishing that foreground/background are hex colors and clarifying that largeText maps to WCAG large-text thresholds. It says nothing about the label field or the min/max item constraints, so roughly half the parameter surface is still undocumented.

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 (evaluate), a specific resource (foreground/background hex color ratios) and the standard being applied (WCAG AA and AAA). No sibling tool in the list shares this domain, so there is no ambiguity to resolve and an agent can select it immediately.

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?

Usage is implied by the purpose statement (you call it when you need to verify color contrast compliance), but there is no explicit when-to-use/when-not-to-use guidance, no prerequisites, and no mention of how it relates to siblings like extract_design_tokens or audit_ui_page. The only directive offered, 'specify largeText for large type,' is parameter-level, not selection-level.

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