Skip to main content
Glama
Color Theory MCP Server

Color Theory MCP Server

validate-wcag-contrast

Check whether a foreground and background color combination meets WCAG contrast requirements for text, UI components, or graphical objects at AA or AAA levels.

Instructions

Check if a color combination meets WCAG accessibility requirements

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "foreground": "<foreground>",
      "background": "<background>"
    },
    "name": "validate-wcag-contrast"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelNoWCAG conformance level to checkAA
textSizeNoText size categorynormal
backgroundYesBackground color
foregroundYesForeground (text) color
componentTypeNoElement type: text, UI component (buttons/inputs), or graphical objecttext

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It does not state what the tool returns (pass/fail, contrast ratio, detailed report), how conformance levels and text sizes affect thresholds, or whether the operation is purely computational and safe.

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 definition is a single front-loaded sentence with zero wasted words. It is appropriately sized for a tool whose parameter details are fully covered by the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter validation tool with no annotations and no output schema, the description is too thin. It should at least explain the return value and how level, textSize, and componentType influence the WCAG check, since neither structured annotations nor an output schema provide that context.

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 input schema already documents all five parameters, including enums and defaults. The description adds no parameter-specific meaning beyond the schema, making the baseline score of 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a clear verb ('Check') and states the resource and standard ('color combination meets WCAG accessibility requirements'). It is understandable without opening the schema, but it does not distinguish this tool from sibling contrast tools such as calculate-contrast or calculate-apca-contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus the many sibling contrast calculators and validators. The intended use is implied by the word 'WCAG,' but the description offers no alternatives, exclusions, or contextual conditions.

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