Skip to main content
Glama
ogSINGH

contrast-checker-mcp

by ogSINGH

suggest_accessible_color

Suggest a WCAG-compliant color by adjusting lightness while preserving hue and saturation to meet a target contrast ratio against a given background or foreground.

Instructions

Suggest a replacement color that meets a WCAG contrast target. Adjusts lightness while preserving hue and saturation to stay as close to the original as possible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fixNoWhich color to adjust (default: foreground)foreground
backgroundYesBackground color
foregroundYesForeground color
target_levelNoWCAG target level (default: AA)AA

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and largely succeeds: it discloses the adjustment strategy (lightness only) and the constraint (preserve hue/saturation and stay close to the original). It does not mention failure behavior for impossible contrast targets or the return format, but the core behavioral contract is clearly stated.

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 with no filler: the first states the primary purpose, and the second adds the key behavioral constraint. Every word earns its place and the most important information is front-loaded.

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?

The tool is a simple pure function with all parameters documented in the schema and an implied return value ('replacement color'). The description covers purpose and behavior sufficiently, though it could be more complete by addressing impossible contrast targets and explicitly mentioning sibling tool alternatives.

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 description coverage is 100%, so the schema already documents all four parameters; the baseline is 3. The description adds algorithmic context but no additional parameter-specific meaning, such as accepted color formats or how target_level maps to adjustment behavior.

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 uses a specific verb ('Suggest') and resource ('a replacement color that meets a WCAG contrast target'), and adds the algorithm nuance of adjusting lightness while preserving hue and saturation. This clearly differentiates it from sibling tools check_contrast and parse_color, which do not generate replacement colors.

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 intended use case is implied: use this when a color pair needs to meet a WCAG contrast target and you want the closest adjusted color. However, the description does not explicitly state when not to use it or how it relates to check_contrast and parse_color, so it stops short of clear exclusions or alternative guidance.

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