Skip to main content
Glama
brentspore

buildutilities-mcp

by brentspore

Check Colour Contrast

check_color_contrast
Read-onlyIdempotent

Compute the WCAG 2.2 contrast ratio between two colors and determine if they meet AA or AAA threshold requirements.

Instructions

Compute the exact WCAG 2.2 contrast ratio between two colours and report which AA/AAA thresholds it passes. This is a specific formula, not a judgement call — do not estimate it. Web version: https://buildutilities.com/color-contrast-checker

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundYesHex colour, e.g. #ffffff
foregroundYesHex colour, e.g. #1a1a1a

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false, covering safety. The description adds valuable behavioral context: it is deterministic ('specific formula'), not a judgement call, and outputs threshold status. This goes beyond annotations without contradicting them.

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, front-loaded with the core purpose and result. The caution about not estimating is concise, and the web link is a minor extra. No redundancy.

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 deterministic tool with two well-documented params and no output schema, the description adequately conveys the return behavior ('report which AA/AAA thresholds it passes'). Combined with annotations covering safety, an agent has all needed information to call it 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?

Schema coverage is 100% with clear descriptions for both params ('Hex colour, e.g. #ffffff'). The description adds no additional parameter-specific details beyond what the schema already provides, so baseline 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?

States a specific verb 'Compute' with a precise resource 'WCAG 2.2 contrast ratio between two colours' and the outcome 'report which AA/AAA thresholds it passes'. This clearly distinguishes it from all sibling utilities (generators, encoders, hash functions) which are unrelated.

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 implies when to use it: when an exact ratio is needed, and explicitly cautions 'do not estimate it'. It doesn't name alternatives, but no sibling performs contrast checks, so this is acceptable. It could state 'use when verifying accessibility compliance' but the intent is clear.

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