Skip to main content
Glama

get_a11y_contrast

Read-onlyIdempotent

WCAG contrast ratio between two colors — the check the URL-based a11y endpoint can't do. Give a foreground and background color (hex or rgb()); returns the exact ratio and AA/AAA pass/fail for normal text, large text, and UI components, with a plain-English verdict. ?fg=&bg= ($0.001 per call, paid via x402)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bgYesBackground color — hex or rgb()
fgYesForeground/text color — hex (#111 or #111111) or rgb()

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
passesNo
summaryNo
contrast_ratioNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Adds details beyond annotations: returns exact ratio, AA/AAA pass/fail for different text sizes and UI components, plus plain-English verdict, and cost. No contradictions with annotations.

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?

Concise (three sentences), front-loaded with purpose, but wording 'the check the URL-based a11y endpoint can't do' is slightly awkward. Still efficient and informative.

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?

Describes outputs sufficiently (ratio, pass/fail, verdict) and mentions cost. Does not cover error handling or color validation, but for a simple tool with output schema, it is adequate.

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?

With 100% schema coverage, baseline is 3. The description clarifies which parameter is foreground vs background and suggests hex/rgb format, adding minimal value beyond the schema.

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 clearly states it computes WCAG contrast ratios, specifies the inputs (foreground and background colors), and explicitly differentiates itself from the URL-based a11y endpoint (likely get_a11y_check), which distinguishes it from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains when to use (for color contrast, not URL-based check), gives input format guidance, and mentions cost. It does not explicitly state when not to use, but the differentiation is sufficient.

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.