Skip to main content
Glama

Colour contrast (WCAG)

colour_contrast
Read-onlyIdempotent

The WCAG contrast ratio of a text colour on a background colour, and which levels it passes (AA, AA large, AAA, AAA large), from a-to-mind.com/color/. Colours as hex (#6d4aff), rgb(), hsl() or a CSS name.

Input Schema

NameRequiredDescriptionDefault
textYesThe text colour.
backgroundYesThe background colour.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and non-destructive, so safety is covered. The description adds useful context — accepted colour input syntaxes and the fact that pass/fail levels are returned — but says nothing about precision/rounding of the ratio or the exact output shape. Adequate given the annotation coverage.

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 sentences, zero waste: the computed result leads, and format guidance follows. No repetition of the tool name or 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?

No output schema, but the description discloses that the result is a ratio plus tier pass/fail, which is the essential return contract for an agent. Only the exact output structure and precision remain unstated.

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% and the schema names both parameters, so the baseline is 3. The description goes beyond it by enumerating accepted colour formats (#hex, rgb(), hsl(), CSS name), which meaningfully constrains how to fill both fields.

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 computation (WCAG contrast ratio of a text colour on a background) plus the derived result (which AA/AAA levels pass), which distinguishes it from unrelated siblings like readability. The verb-and-resource framing is precise.

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?

No explicit when-to-use statement or exclusion versus alternatives (e.g. the readability sibling, which an agent might confuse with accessibility checking). Usage is inferable from the purpose, but the description does not route the agent.

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.