Skip to main content
Glama

Agent Data Hub

Colour converter + WCAG contrast checker

util_color
Read-onlyIdempotent

Convert a colour between hex, rgb, hsl, hsv and cmyk (input: hex, rgb(), hsl() or a CSS colour name), get relative luminance, dark/light, and whether black or white text reads better on it. With 'against', returns the WCAG 2.x contrast ratio and pass/fail for AA/AAA normal and large text and UI components. Use for accessible UI, theme generation, brand colour checks. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.

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": {
      "color": "<color>"
    },
    "name": "util_color"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorYesColour: #1a73e8, rgb(26,115,232), hsl(214,82%,51%) or a CSS name
againstNoOptional second colour (e.g. background) for the contrast ratio

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds genuinely new behavioral context beyond annotations: the payable model ($0.001 per call via x402 USDC on Base) and the 10-free-calls-per-day quota, which an agent must know before calling in a loop. It does not describe output shape precisely, but the cost/quota disclosure is real added value.

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?

Front-loaded with the core conversion capability, then the optional contrast mode, then use cases, then pricing. Dense but every clause carries information. The pricing sentence is long but operationally necessary; a bulleted split of conversion vs. contrast output would read marginally better.

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 no output schema, the description carries the burden of describing returns, and it does list luminance, dark/light classification, preferred text colour, and contrast ratio with AA/AAA verdicts. Only the exact response shape and field naming remain unspecified, a small gap for a two-parameter utility.

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 baseline is 3, and the description goes slightly beyond by restating accepted input formats and explaining what 'against' produces (WCAG ratio and AA/AAA pass/fail for normal, large text and UI components). It does not add format or edge-case detail beyond the schema, so it is an incremental rather than substantial gain.

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 and resource ('Convert a colour between hex, rgb, hsl, hsv and cmyk') plus the secondary capability (luminance, dark/light, readable text colour, WCAG contrast ratio). The title and description together let an agent tell immediately that this is a colour-math utility, distinct from siblings like util_calc or util_units.

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 usage contexts: 'Use for accessible UI, theme generation, brand colour checks,' which tells the agent the problem domain the tool serves. It does not state exclusions or point at alternatives, but no sibling in the list plausibly overlaps with colour conversion, so the omission is minor.

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