Skip to main content
Glama
Colors MCP Server

Colors MCP Server

by HtetOoWaiYan

Check contrast

colors_check
Read-onlyIdempotent

Check WCAG contrast for text/background color pairs and get PASS/FAIL, exact ratios, APCA Lc scores, and nearby passing colors for accessibility fixes.

Instructions

Check WCAG 2 contrast for text/background color pairs and say PASS or FAIL for each, with the exact ratio and, for failures, a nearby passing color. Also gives the signed APCA Lc (APCA-W3 0.98G-4g: positive for dark text on light, negative for light on dark). Use whenever you must know if colors are readable or accessible. Handles translucent colors. Pass foreground+background, or pairs for many.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "colors_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNoColor that translucent backgrounds are composited over. Default "#ffffff".
sizeNo"normal" text (default), "large" text (24px or 18.66px bold and up), or "ui" for non-text parts like borders and icons.normal
levelNoWCAG level. Default "AA".AA
pairsNoSeveral checks at once: a list of {foreground, background}. Use instead of foreground/background.
backgroundNoBackground color, for a single check. Any CSS color.
foregroundNoText color, for a single check. Any CSS color.

Output Schema

NameRequiredDescriptionDefault
sizeYes
levelYes
allPassYes
resultsYes
requiredYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish that this is a safe, read-only, idempotent, closed computation, so there is no auth, cost, or destruction to disclose. The description still adds useful behavior beyond them: translucent colors are composited (implying the base parameter matters) and failures include a suggested nearby passing color. Its explanation of return values is partly redundant given the output schema, keeping it off a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and result shape, then supporting detail, with no filler sentences. The APCA sign convention and version string are dense but genuinely informative, though the output-description clause is slightly over-weighted for a tool with an output schema.

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?

With a full output schema, complete parameter descriptions, and rich annotations, the remaining descriptive burden is small, and the description covers what the check evaluates, its two scoring systems, translucent handling, and batch mode. Nothing an agent needs to invoke it correctly appears missing.

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% and the schema already documents base, size, level, pairs, and the single-pair fields. The description only adds the pairing mode distinction ("Pass foreground+background, or pairs for many"), which the schema also states; it says nothing about size or level that the schema lacks.

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 and resource — check WCAG 2 contrast for text/background color pairs — and names concrete outputs (PASS/FAIL, ratio, nearest passing color, signed APCA Lc). That set of concerns is distinct from the nearby names like colors_compare or colors_audit.

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?

"Use whenever you must know if colors are readable or accessible" gives a clear trigger condition, and the final sentence explains the single-pair vs. batch modes. It does not explicitly exclude or redirect to alternatives such as colors_compare or colors_audit, so it stops short of full when-not guidance.

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