Skip to main content
Glama

Benchline

Convert a color and check contrast

convert_color
Read-onlyIdempotent

Convert HEX, RGB, HSL, OKLCH, or CMYK into every format, name the nearest Tailwind token, and report the WCAG 2 contrast ratio against a background.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYesHEX, rgb(), hsl(), oklch(), cmyk(), or a CSS color name.
backgroundNoBackground used for the WCAG contrast ratio.#ffffff

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
hexYes
hslYes
rgbYes
cmykYes
oklchYes
aaLargeYes
aaNormalYes
aaaLargeYes
tailwindYes
aaaNormalYes
contrastTextYes
contrastRatioYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: it performs three distinct operations (multi-format conversion, Tailwind token lookup, WCAG 2 contrast computation) and notes the contrast is measured against a background, which is not obvious from annotations alone.

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 zero filler; every clause names a capability (conversion, token naming, contrast) without redundancy.

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?

With an output schema present, return values need no explanation, and annotations cover the safety profile. The description is complete for a simple two-parameter tool; the only minor gap is the absence of usage routing against siblings.

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 schema already documents both parameters and their accepted formats. The description only vaguely gestures at the background parameter ('against a background') without adding format or semantics beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (convert) and resource (color), and enumerates the input formats (HEX, RGB, HSL, OKLCH, CMYK) plus two additional capabilities (Tailwind token naming, WCAG contrast). This clearly distinguishes it from near-neighbors like convert_units and convert_case.

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 purpose strongly implies the use case, but there is no explicit when-to-use/when-not-to guidance and no mention of alternatives such as convert_units for non-color conversions. Usage is inferable rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources