Skip to main content
Glama
ogSINGH

contrast-checker-mcp

by ogSINGH

check_contrast

Check contrast ratio between two colors to evaluate WCAG 2.1 accessibility compliance. Supports hex, RGB, HSL, and named colors.

Instructions

Check the contrast ratio between two colors and evaluate WCAG 2.1 compliance. Accepts hex (#fff, #ffffff), rgb(r,g,b), hsl(h,s%,l%), and CSS named colors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundYesBackground color (e.g. '#fff', 'rgb(255,255,255)', 'white')
foregroundYesForeground color (e.g. '#333', 'rgb(0,0,0)', 'navy')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden and does disclose core behavior: computing a ratio, evaluating WCAG 2.1, and accepting various color formats. It does not reveal the output shape, WCAG levels/thresholds, or how invalid colors are handled.

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?

The description is two focused sentences with no filler. It front-loads the primary function and follows with the accepted input formats, making it easy to scan.

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 simple two-parameter tool with full schema coverage, the description is largely complete. The main missing piece is an explicit statement about the return format, but the tool's purpose and invocation requirements are clear enough.

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?

The schema already provides 100% coverage with descriptions and examples for both parameters. The description adds value by explicitly listing all accepted formats (hex, rgb, hsl, named colors), which clarifies valid inputs beyond the schema examples.

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 operation ('Check the contrast ratio') and resource (two colors), and adds a concrete outcome: evaluating WCAG 2.1 compliance. It also enumerates accepted color formats, making its scope clear and distinguishing it from siblings like parse_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?

The use case is implied: use this tool when a contrast ratio or WCAG compliance check is needed. However, it never explicitly contrasts itself with suggest_accessible_color or parse_color, nor does it state when to prefer those alternatives.

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