Skip to main content
Glama

contrast_ratio

Read-onlyIdempotent

Contrast checker — WCAG AA/AAA

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": {
      "foreground": "<foreground>",
      "background": "<background>"
    },
    "name": "contrast_ratio"
  }
}

Input Schema

NameRequiredDescriptionDefault
backgroundYesBackground color as hex, for example #ffffff.
foregroundYesText color as hex, for example #333333.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / background / description
      Added value: +"Background color as hex, for example #ffffff."
    • addedInput schema / properties / foreground / description
      Added value: +"Text color as hex, for example #333333."
  2. First observed

TDQS

C2.5/5.0
Behavior2/5

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

Annotations already declare readOnly, idempotent, and non-open-world behavior, so the description's job is to add context. The WCAG AA/AAA mention is the sole extra signal, and it doesn't explain which thresholds are applied, whether multiple verdicts are returned, or what the output looks like — significant given there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two words plus a standard reference is front-loaded and waste-free, but the size reflects under-specification rather than economical precision. It leaves out information an agent needs rather than compressing useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations covering return behavior, the description should say whether the result is a numeric ratio, a pass/fail per AA and AAA level, or both. That crucial output expectation is entirely absent for a computation tool.

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%, with both foreground and background documented as hex strings with examples. The description adds nothing beyond this, so the baseline 3 applies since the schema carries parameter semantics fully.

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

Purpose3/5

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

The description identifies the resource ('Contrast checker') and adds the WCAG AA/AAA standard, which hints at contrast-ratio evaluation. However, it never states a verb or what the tool actually produces (ratio value vs. pass/fail), so a reader must infer the operation from the name alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no mention of prerequisites, and no routing to or away from alternatives such as analyze_readability. The only context is the WCAG reference, which implies accessibility checks but not when to pick this tool.

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