Skip to main content
Glama
Colors MCP Server

Colors MCP Server

by HtetOoWaiYan

Compare colors

colors_compare
Read-onlyIdempotent

Compare a reference color against candidate colors using CIEDE2000, CIE94, CIE76, Oklab, or all metrics to find the closest match and full ranking for palette matching or same-color checks.

Instructions

Measure how different colors look from a reference: CIEDE2000 (ΔE00, default), CIE94, CIE76 or Oklab distance, or all of them at once. Returns the nearest candidate and a full ranking, closest first. Use for 'which color is closest', 'are these the same color', or matching to a palette. Under 1 is not noticeable; over 10 is very different.

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": {
      "color": "<color>",
      "candidates": "<candidates>"
    },
    "name": "colors_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorYesThe reference color. Any CSS color: "#3b82f6", "rgb(59 130 246)", "oklch(0.62 0.19 260)", "tomato".
metricNo"ciede2000" (default, ΔE00), "cie94" (graphic-arts weights, reference chroma), "cie76" (Euclidean in CIELAB), "oklab" (Euclidean in Oklab) or "all" (every metric; ranked by ΔE00). Lab is D65, no adaptation.ciede2000
candidatesYesColors to compare against the reference. A list, even for a single color. Any CSS color strings.

Output Schema

NameRequiredDescriptionDefault
metricYes
nearestYes
rankingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, closed-world, non-destructive behavior, so the bar is lower. The description still adds real context the annotations cannot: the default metric, that a full ranking is returned closest-first, and how to read the magnitude of a ΔE score.

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, then metric options, then use cases, then the interpretation scale — a sensible ordering with no filler sentences. The metric enumeration is partly redundant with the schema's enum descriptions, which is the only inefficiency.

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?

Only three parameters, all schema-documented, and an output schema exists so return values need no explanation. The description nevertheless covers output shape (nearest plus full ranking) and score interpretation, leaving little an agent would need to guess.

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 itself documents every parameter, including the metric enum and the D65/no-adaptation note. The description restates the metric choices and flags CIEDE2000 as default, which largely duplicates structured data rather than extending it. Baseline 3 is 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?

Specific verb and resource: measures color difference from a reference using a named metric family, returning nearest candidate plus a ranking. It is clearly a measurement/comparison tool, distinguishable from sibling-style operations like conversion or harmony. It stops short of naming an alternative tool, but the purpose itself is unambiguous.

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?

Gives three concrete triggering phrasings ('which color is closest', 'are these the same color', matching to a palette) and an interpretation scale (under 1 not noticeable, over 10 very different) that tells the agent when a result matters. No explicit when-not or named alternative tool, which keeps it below a 5.

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