Skip to main content
Glama

Agent Data Tools: Utilities

Colour contrast check (WCAG)

color_contrast

WCAG 2 contrast ratio between a text colour and a background colour, with pass/fail for AA and AAA at normal and large text sizes. Use to check that a design is readable. Example: fg=#767676, bg=#ffffff. Price $0.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only; not marked read-only because each call is charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bgYesBackground colour
fgYesText colour

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond annotations: it explains why readOnlyHint is false (each call is charged), discloses the pricing model, the free-tier allotment, that failed calls are free, and the auth mechanisms (x402 USDC or card key). This resolves the one annotation that would otherwise puzzle an agent.

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-loads the purpose and example, then handles the read-only caveat and pricing compactly. The pricing clause is long but load-bearing for agent decision-making, so little is wasted.

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

Completeness5/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 compensates by stating exactly what is returned (a ratio plus AA/AAA pass/fail at normal and large text sizes). Combined with payment and auth details, an agent has everything needed to call this correctly.

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 baseline is 3, but the description adds a concrete example (fg=#767676, bg=#ffffff) that demonstrates the expected hex colour format, which the schema's 'Text colour'/'Background colour' labels do not convey.

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: computes the WCAG 2 contrast ratio between a text colour and a background colour, returning AA/AAA pass/fail at normal and large sizes. This clearly distinguishes it from the sibling 'color' and 'random_color' tools, which do not evaluate contrast.

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 to check that a design is readable' gives clear intended context, and the fg/bg example shows the calling pattern. It does not state when-not to use it or name an alternative, but for a single-purpose utility the guidance is sufficient to route correctly.

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.