Skip to main content
Glama
Color Theory MCP Server

Color Theory MCP Server

calculate-apca-contrast

Calculate APCA (WCAG 3.0) perceptual lightness contrast between text and background colors to evaluate readability and accessibility.

Instructions

Calculate APCA (WCAG 3.0) perceptual lightness contrast between text and background colors

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": {
      "textColor": "<textColor>",
      "backgroundColor": "<backgroundColor>"
    },
    "name": "calculate-apca-contrast"
  }
}

Input Schema

NameRequiredDescriptionDefault
textColorYesText/foreground color
backgroundColorYesBackground color

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It says what is computed but not that this is a pure read-only calculation, not what the result looks like (an Lc value and its range/threshold), and not what color string formats are accepted — a real gap for a no-annotation tool.

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?

A single front-loaded sentence with no filler; the standard qualifier is placed immediately after the acronym where it matters. It is efficient but so terse that it omits information the other dimensions penalize.

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?

With no annotations and no output schema, the description should say what the return value is (Lc score, pass threshold) and what input formats are valid. Neither is covered, so an agent can pick the tool but cannot reliably form the arguments or interpret the result.

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 both required parameters (textColor, backgroundColor) are already documented, so the baseline is 3. The description reinforces the text/foreground and background roles but adds no accepted-format detail (hex, rgb(), named colors) beyond what the schema states.

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?

States a specific verb (Calculate) and resource (APCA perceptual lightness contrast) and marks the standard as WCAG 3.0, which implicitly distinguishes it from WCAG 2-based siblings like calculate-contrast or validate-wcag-contrast. It stops short of naming an alternative explicitly, so no sibling differentiation credit beyond the standard qualifier.

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 "APCA (WCAG 3.0)" label implies when to prefer this over a classic contrast-ratio tool, but there is no explicit when-to-use/when-not statement or named alternative. An agent must infer the selection rule rather than read it.

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