Skip to main content
Glama

color_distance

Read-onlyIdempotent

Calculate perceptual distance between two colors using Delta E 2000 or alternative metrics to determine how visually similar they are.

Instructions

Calculate perceptual distance between two colors using Delta E 2000

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": {
      "color1": "<color1>",
      "color2": "<color2>"
    },
    "name": "color_distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
color1YesFirst color (hex, rgb, or hsl)
color2YesSecond color (hex, rgb, or hsl)
metricNoDistance metric to usedeltaE2000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety and determinism profile is fully covered. The description adds only the fact that the distance is computed with Delta E 2000; it says nothing about the output scale, the units of the returned number, or how to interpret magnitude.

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?

A single front-loaded sentence with no filler, immediately conveying the verb, inputs and method. Nothing is wasted and nothing blocks comprehension.

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

Completeness3/5

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

For a three-parameter pure computation with rich annotations and a fully described schema, the essentials are present. However, since no output schema exists, the definition could have said what the result looks like (a scalar distance and its useful range), and it should reconcile the fixed-sounding Delta E 2000 phrasing with the selectable metric enum.

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 all three parameters including the metric enum are already documented with accepted color formats and a default of deltaE2000. The description adds no meaning beyond the schema, and naming only 'Delta E 2000' could leave an agent unaware that euclidean, deltaE76, deltaE94 and weighted are also selectable.

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 and resource ('Calculate perceptual distance between two colors') and names the algorithm, so the agent knows exactly what computation happens. It is clearly distinct from siblings like check_contrast or match_theme_color, though it never explicitly names an alternative to route away from.

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 when-to-use guidance: nothing tells the agent whether this is for comparing two candidate colors, for ranking similarity within a palette, or when to prefer check_contrast (contrast ratio) instead of perceptual distance. Usage is only inferable from the verb and resource, with no exclusions stated.

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