Skip to main content
Glama

Alomo: Developer utilities

Check color contrast against WCAG

check_color_contrast
Read-onlyIdempotent

Computes the WCAG 2.x contrast ratio between a text color and a background color and reports pass/fail for AA and AAA, for normal text, large text (18pt, or 14pt bold) and UI components. Suggests the nearest passing text color when AA fails. Accepts #hex, rgb() or basic color names.

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": {
      "foreground": "<foreground>",
      "background": "<background>"
    },
    "name": "check_color_contrast"
  }
}

Input Schema

NameRequiredDescriptionDefault
backgroundYesBackground color, e.g. '#ffffff'.
foregroundYesText color, e.g. '#767676'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, so the description's job is to add computational detail — which it does: WCAG 2.x version, the three evaluation contexts, AA/AAA thresholds, and the notable side behavior of suggesting the nearest passing text color when AA fails. What it does not fully disclose is the shape of the response (ratio value plus per-level verdicts), which matters slightly since there is no output schema.

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?

Three sentences, all substantive: what it computes, what it reports, and what it does on failure. The core verb and resource lead the sentence and there is no filler or repetition of the title.

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 small two-parameter pure computation with no output schema, the description covers inputs, evaluation criteria, and the fallback suggestion. The only remaining gap is the precise return structure (e.g., numeric ratio field names), which the description only implies through 'Computes ... and reports pass/fail'.

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 the schema already documents both parameters with examples. The description still adds real meaning beyond it by stating the accepted input formats ('#hex, rgb() or basic color names'), which the schema does not mention — an agent would otherwise not know rgb() strings are valid.

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 verb and resource ('Computes the WCAG 2.x contrast ratio between a text color and a background color') and enumerates the exact outputs: pass/fail for AA and AAA across normal text, large text (18pt or 14pt bold) and UI components. It is unmistakable against the unrelated sibling utilities (currency, IBAN, page speed) and even covers the fallback behavior of suggesting a passing color.

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 precise scope — you call it when you need to verify color accessibility — and the formats accepted are stated. However, there is no explicit when-to-use or when-not-to-use guidance, and no exclusions or prerequisites are given; with no near-equivalent sibling to route against, this is adequate but not proactive.

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