Skip to main content
Glama
grayscale-mcp

grayscale-mcp

by truefrontier

Color luminance and contrast

color_info
Read-onlyIdempotent

Parse hex, RGB, or HSL colors to get hex, RGB, HSL, OKLCH, luminance, auto-generated names, and WCAG contrast ratios against white, black, or a second color.

Instructions

Parse a color the way the site does and return hex, rgb, hsl, oklch, its luminance (the site's color value, 0-100), the site's auto name, and WCAG contrast ratios against white, black and an optional second color.

Input Schema

NameRequiredDescriptionDefault
colorYesHex, rgb(...) or hsl(...).
againstNoOptional second color for a contrast ratio.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, so the description would only need to add output-side context — and it does, listing every returned field since there is no output schema. The note that luminance is 'the site's color value, 0-100' is genuinely non-obvious domain context. It omits what happens with an unparseable color string, which keeps it from a 5.

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 waste-free sentence with the verb and resource front-loaded and the return payload following. It is dense — one long clause chain — but nothing is redundant, and trimming further would cost real information.

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 2-parameter read-only tool with full schema coverage and no output schema, the description supplies the return contract and the site-specific luminance scale, which is exactly what structured fields don't cover. Only error/edge behavior for malformed color input is unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the 3 baseline is already met. The description still adds meaning to 'against' by framing it as one of the WCAG contrast targets alongside the always-computed white and black, which the schema's 'Optional second color for a contrast ratio' leaves ambiguous.

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 ('Parse a color') plus an explicit enumeration of the returned representations (hex, rgb, hsl, oklch, luminance, auto name, WCAG ratios), which makes it distinguishable from luminance_scale and adjust_shade on output shape alone. It never names a sibling or states the boundary explicitly, so it stops short of a 5.

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?

Usage is only implied: the mention of contrast against white, black and an optional second color signals this is the tool for 'can I read text on this color' checks. There is no when-to-use/when-not and no reference to the palette/sibling tools an agent might otherwise pick.

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