Skip to main content
Glama

Contrast checker

hopi_contrast_checker
Read-onlyIdempotent

Work out the WCAG contrast ratio between a foreground (text) colour and a background colour, both as hex codes, and report whether it passes AA and AAA for normal and large text. Source: https://hopi.co.uk/contrast-checker/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundYesBackground colour as a six-digit hex code, e.g. #FFFFFF
foregroundYesText colour as a six-digit hex code, e.g. #767676

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ratioNo
aaLargeNo
summaryYes
verdictNo
aaNormalNo
aaaLargeNo
aaaNormalNo
backgroundNo
foregroundNo
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)
ratioStringNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "source_url",
      +  "summary"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds context beyond these by specifying the output details (AA/AAA for normal and large text) and citing an external source URL, implying a network-backed calculation. No contradiction 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.

Conciseness5/5

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

Two tight sentences: the first front-loads the action, inputs, and output criteria; the second is a brief source citation. No redundant phrasing or 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?

For a simple two-parameter calculator, the description is complete: it defines the computation, the input format, the pass/fail reporting (AA/AAA, normal/large text), and even links a reference. The output schema is also available, so the agent has all necessary information to select and invoke the tool correctly.

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?

The schema covers both parameters fully with descriptions ('Background colour as a six-digit hex code', 'Text colour as a six-digit hex code'). The description merely restates that inputs are hex codes, adding no new semantic detail beyond the schema, so the baseline of 3 is appropriate.

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 names a specific action ('Work out the WCAG contrast ratio') with a clear resource (foreground text vs background colour, both hex codes) and states the output (pass/fail for AA and AAA for normal and large text). This is distinct from sibling colour tools like hopi_hex_to_rgb or hopi_colour_name_finder, which address different tasks.

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?

The description gives clear usage context: it's for WCAG contrast checking with specific input types. However, it does not explicitly name alternatives or state when NOT to use it, though the accessibility focus implicitly separates it from conversion/generation siblings.

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