Skip to main content
Glama

Contrast Matrix

contrast_matrix

Checks every text-on-background color combination in a provided color set at once, labels each with WCAG AA/AAA compliance, and lists accessible pairings.

Instructions

Check every text-on-background combination across a set of colors at once, with AA/AAA labels and the best accessible combos. Deterministic, no API key needed.

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": {
      "colors": "<colors>"
    },
    "name": "contrast_matrix"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

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 the full burden, and it does disclose useful operational facts: the check is deterministic and needs no API key, and the response includes AA/AAA labels plus best accessible combos. It does not describe behavior on malformed hex values or how ties among 'best' combos are resolved, leaving modest gaps.

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, front-loaded with the core operation and followed by the differentiators. No filler or repeated phrasing.

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?

This is a simple single-parameter computation tool with no output schema, and the description says what the output contains (AA/AAA labels and best combos), so an agent knows what to expect back. The remaining gap is input shape detail, which is thin but partly recoverable from the schema itself.

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 coverage is 0%, so the description must supply meaning, and it only conveys that the input is a set of colors used as both text and background. It says nothing about the hex format, the optional name field, or the 2-to-12 item bounds enforced by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: checking every text-on-background pairing across a color set, with AA/AAA labels and recommended combos. The phrase 'across a set of colors at once' implicitly separates it from the singular check_contrast sibling, though it never names that alternative explicitly.

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 bulk framing ('every combination ... at once'), which suggests using this rather than a single-pair check when evaluating a palette. There is no explicit when-not guidance or named alternative, so the agent must infer the boundary with check_contrast on its own.

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