Skip to main content
Glama

color_contrast

Check the WCAG contrast ratio between two colours and report AA and AAA pass or fail for normal and large text. Pure CPU, instant. Use before shipping a palette

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": {
      "fg": "<fg>"
    },
    "name": "color_contrast"
  }
}

Input Schema

NameRequiredDescriptionDefault
bgNoBackground colour
fgYesForeground colour

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / bg
      Added value: +{
      +  "description": "Background colour",
      +  "type": "string"
      +}
    • addedInput schema / properties / fg
      Added value: +{
      +  "description": "Foreground colour",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "fg"
      +]
  4. Added

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It helpfully discloses that the work is "Pure CPU, instant" (no network, no rate limit) and describes the shape of the result (AA and AAA pass/fail for normal and large text), but it says nothing about accepted colour formats, validation failures, or what happens with malformed input.

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?

Three short clauses, all front-loaded: what it computes, what it returns, then the usage cue. Nothing is wasted and nothing is buried.

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 two-parameter, single-purpose utility with full schema coverage, the description is nearly sufficient, and it even compensates for the missing output schema by describing the AA/AAA verdicts. The remaining hole is format expectations for the colour strings and the behaviour when bg is omitted.

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 both parameters already document what they are, and the description's "between two colours" only confirms the fg/bg relationship. It does not explain the significant asymmetry that fg is required while bg is optional — an agent gets no hint about the default background when bg is omitted.

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?

The description gives a specific verb and resource: check the WCAG contrast ratio between two colours, and it adds the reported verdicts (AA/AAA for normal and large text). That is far more precise than the neighbouring color, color_harmony, and color_palette tools, but it never explicitly names a sibling or states what it does not do, so it stops short of full differentiation.

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?

"Use before shipping a palette" supplies a concrete when-to-use trigger tied to a real workflow moment. There are no explicit exclusions or named alternatives (e.g. use color_palette to generate, this to validate), so guidance is clear but not complete.

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