Skip to main content
Glama
crisjonblvx

enrichrapi-mcp

by crisjonblvx

validate_color

Validate any color string and convert between hex, RGB, and HSL formats, with a dark/light indicator based on WCAG luminance.

Instructions

Validate a color and convert it between hex, rgb, and hsl formats.

Accepts hex (#FF5733 or shorthand #F53), rgb(255,87,51), rgba(), hsl(14, 100%, 60%), and hsla(). Always returns all three formats plus a dark/light indicator based on WCAG luminance.

Args: color: Color string in any supported format

Returns: dict with keys: valid, input_format, hex, rgb, rgb_string, hsl, hsl_string, is_dark, cost_usd

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations, the description must carry the full burden, and it does disclose useful behavior: it always returns all three formats and a WCAG-luminance-based dark/light indicator, and lists the output dict keys. However, it does not state what happens for invalid colors (e.g., whether `valid` is just false or whether an error is thrown), which is a salient behavioral gap for a validation tool.

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?

The description is tight and well-structured: a two-sentence summary, followed by compact Args and Returns blocks. Every line adds either input format knowledge or output contract knowledge, with no filler or repetition.

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?

Given there is no output schema, the description properly documents the return shape and normalization behavior. The only meaningful omission is invalid-input behavior, which prevents a perfect completeness score for a tool whose primary purpose is validation.

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

Parameters5/5

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

The schema only says `color` is a string, so the description provides essentially all semantic meaning. It spells out supported formats with concrete examples (e.g., #FF5733, #F53, rgb(255,87,51), hsl(14, 100%, 60%)) and confirms the input is 'a color string in any supported format,' fully compensating for 0% schema coverage.

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?

The description opens with a precise verb-resource pair: 'Validate a color and convert it between hex, rgb, and hsl formats.' It then enumerates the accepted input formats, making it unmistakably distinct from sibling validate_* and conversion tools.

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?

The description clearly defines the valid input domain (hex, shorthand hex, rgb, rgba, hsl, hsla) and tells the agent what will be returned, making the conditions for use clear. It does not explicitly name alternatives, but no sibling tool targets color, so exclusions are unnecessary.

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