Skip to main content
Glama

calculate_color_contrast_wcag

Calculate WCAG 2.1 AAA contrast ratios and relative luminance for foreground and background colors, ensuring accessible color combinations.

Instructions

Calculates relative luminance and exact contrast ratio between foreground and background colors according to WCAG 2.1 AAA standards. (0.005 USDC on Base L2)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYesInput parameters or JSON string payload for the tool execution
paymentSignatureNoBase L2 USDC micropayment signature or transaction hash for x402 settlement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description must carry behavioral disclosure. It does add useful context: the computation follows WCAG 2.1 AAA and costs 0.005 USDC on Base L2. However, it does not state that a paymentSignature is required for settlement, nor describe expected outputs or failure behavior, leaving part of the behavioral burden unmet.

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 a single, front-loaded sentence followed by a parenthetical cost note. There is no fluff; every part adds meaningful information about what the tool does or what it costs.

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?

Despite having no output schema and no annotations, the description does not explain how to construct the payload, what color formats are accepted, or what exact result shape the agent should expect. The paid nature is hinted at only by the cost parenthetical, not by an explicit requirement to supply paymentSignature.

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?

The schema already describes both parameters with 100% coverage, so the baseline is 3. The description adds that the payload should involve foreground and background colors, which is helpful, but it does not specify the exact key names, color format, or JSON structure expected inside the generic payload string.

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 names a specific verb ('Calculates'), a specific resource ('relative luminance and exact contrast ratio between foreground and background colors'), and a concrete standard ('WCAG 2.1 AAA'). This clearly separates it from sibling color tools like convert_hex_rgb_hsl or extract_dominant_color_palette.

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 explicit guidance about when to use this tool versus alternatives, nor any mention of when not to use it. The WCAG reference implies an accessibility use case, but the description never states the intended context or distinguishes it from other color/calculation tools.

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

Deploy Server

Other Tools