Skip to main content
Glama

Moltline Vision Maths

Colour Check

colour_check
Read-onlyIdempotent

Check a colour pair against the WCAG contrast thresholds. FREE.

Uses the WCAG 2 relative-luminance formula, so the number matches what an accessibility audit will report. Typical input {"foreground": "#767676", "background": "#ffffff"} returns {"contrast_ratio": 4.54, "AA": true, "AAA": false, "required": {"AA": 4.5, "AAA": 7.0}, "verdict": "Passes AA for normal text, fails AAA."}.

Use when generating or auditing an interface. Not for converting colours between spaces and not for palettes. Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""} (for example {"error": "foreground must be a hex colour like #767676"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

NameRequiredDescriptionDefault
backgroundYesBackground colour in the same notation.
foregroundYesText colour as hex, e.g. "#767676" or "767676" or "#777".
large_textNoTrue for text at least 18pt, or 14pt bold, which WCAG allows to pass at a lower ratio. Default false.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so restating "read-only and idempotent" earns nothing. The genuinely additive disclosure is the error contract — it never raises a protocol error and instead returns {"error": ...} — plus the claim that results match what a real accessibility audit reports. Those are useful, but the section is partly spent repeating structured fields.

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?

The core action and the exclusion list are front-loaded and easy to scan. The "FREE." fragment and the redundant restatement of the annotation flags are mild filler, and the worked example plus a separate error example is more illustration than most agents need, but nothing is misleading.

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?

An output schema exists, so return values need no prose explanation, and the annotations already cover the safety profile. What remains — the exclusion boundary, the error-not-exception contract, and the audit-matching precision claim — is all present, leaving no gap an agent would have to discover by trial.

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% and every property is documented inline, including the accepted hex variants and the 18pt/14pt-bold rule for large_text, so baseline 3 applies. The worked input/output example reinforces the input format but adds no semantics the schema doesn't already carry, and large_text's effect on the returned thresholds is only implied by the example's "required" block.

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 — "Check a colour pair against the WCAG contrast thresholds" — and immediately binds it to a concrete computation (WCAG 2 relative-luminance). It also excludes adjacent purposes (colour-space conversion, palette generation), so an agent can tell it apart from anything else in the toolset without opening the schema.

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

Usage Guidelines5/5

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

"Use when generating or auditing an interface" gives a positive trigger, and "Not for converting colours between spaces and not for palettes" gives explicit negatives. The error contract adds the recovery path (correct input, then retry), which is the remaining thing an agent needs to know to use it safely in a loop.

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.