Skip to main content
Glama

Check an image for colorblind-safety

checkImage

Detect if an image's colors stay distinguishable for colorblind viewers: extracts dominant colors, simulates protanopia/deuteranopia/tritanopia, and flags collapsing pairs.

Instructions

Check whether the colors in an image, chart, screenshot or mockup stay distinguishable for people with color-vision deficiency. Extracts the image's dominant colors, simulates protanopia, deuteranopia and tritanopia, and flags the color pairs that collapse into each other — each with how much of the image's area those colors cover, so a conflict between two large regions ranks above one between two specks. Reads PNG and JPEG. Pass path for a local file, or a base64 dataUri. Set returnSimulated=true to also get back the image as a deuteranope sees it. A screening aid, not a legal (ADA/WCAG) audit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to a local PNG or JPEG file, e.g. ./dashboard.png
dataUriNoBase64 data URI of the image, if you don't have a file path
maxColorsNoHow many dominant colors to extract and test (default 12)
simulateTypeNoWhich deficiency to render when returnSimulated is set (default deutan)
returnSimulatedNoAlso return the image recolored as a deuteranope sees it (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the pipeline (dominant color extraction, protan/deutan/tritan simulation, pair-collapse detection), the severity-ranking behavior (area coverage so big-region conflicts outrank specks), supported formats (PNG/JPEG), and a non-obvious optional behavior (returnSimulated). It does not describe error modes (e.g., unreadable file, unsupported format) or how the returned conflict list is shaped.

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?

Front-loaded with the purpose, then behavior, then input modes, then the caveat — a sensible information hierarchy. Every clause carries information (simulation types, area-weighted ranking, formats, caveat); nothing is padding.

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?

For a 5-parameter, zero-required tool with no output schema, the description covers what it does, what it accepts, and roughly what it returns (flagged pairs with area coverage). Gaps are minor: no statement about behavior when neither path nor dataUri is supplied, no error handling, and no note that the output conflicts are ranked.

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 baseline is 3. The description adds only modest value beyond the schema: it explains the path-vs-dataUri choice ('pass path for a local file, or a base64 dataUri') and clarifies that returnSimulated yields the recolored image itself. maxColors and the simulateType enum are left entirely to the schema.

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 concrete verb + resource (check an image's colors for color-vision-deficiency safety) and enumerates accepted artifacts (image, chart, screenshot, mockup), which implicitly separates it from the palette-oriented siblings checkPalette/generateSafePalette. It never names an alternative tool, so the differentiation from checkContrast/simulateColor is left to inference.

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 clear operating context (screening rendered images for CVD conflicts) and a useful scope boundary: 'A screening aid, not a legal (ADA/WCAG) audit.' It does not, however, route the agent to a specific sibling — e.g., checkContrast for WCAG ratios or checkPalette for raw palettes — so the when-to-use-this-vs-that decision is only implied.

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