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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint), the description adds valuable behavioral details: it never raises protocol errors but returns a structured error object, and it explicitly reinforces that every call is read-only and idempotent, making retries safe. It also reveals the underlying WCAG 2 relative-luminance formula, providing transparency about the computation method.

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 description is structured with clear paragraphs, front-loading the core purpose, then an example, then usage guidance, and error/retry notes. It is slightly verbose but every sentence contributes meaning—no fluff. It uses bullet-like formatting and bold for emphasis, making it scannable.

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?

The description is complete for the tool's complexity. It includes an example output (which is also available via output schema), covers error handling, usage context, and retry safety. Given the output schema exists, there is no need to explain return values further. The tool is simple, and the description addresses all relevant aspects.

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?

The schema covers all parameters with 100% coverage, so the baseline is 3. The description adds significant value by providing a concrete example input and output, which clarifies the expected format for foreground and background (hex strings with or without '#'), and implicitly illustrates the large_text parameter via the AA/AAA thresholds. This goes beyond schema basics.

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 clearly states the tool's function: 'Check a colour pair against the WCAG contrast thresholds.' It specifies the resource (colour pair) and the action (check against WCAG). It also distinguishes from siblings by explicitly saying 'Not for converting colours between spaces and not for palettes.' The example output further clarifies the purpose.

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?

The description provides explicit guidance: 'Use when generating or auditing an interface. Not for converting colours between spaces and not for palettes.' It also describes error handling behavior and retry safety, giving clear context on when this tool is appropriate. This fully addresses usage scenarios and exclusions.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each of the six tools addresses a clearly distinct operation: bbox_convert handles format transforms, nms removes duplicate detections, detection_metrics evaluates predictions, image_probe reads headers, resize_plan computes resize parameters, and colour_check checks WCAG contrast. There is no overlap or ambiguity between them.

Naming Consistency3/5

Most tools follow a noun_verb pattern (bbox_convert, colour_check, image_probe, resize_plan) but two are outliers: detection_metrics is noun_noun and nms is an acronym. Naming is readable but not fully consistent across the set.

Tool Count5/5

Six tools is a well-scoped count for a vision/maths utilities server. Each tool covers a distinct, necessary facet of computer vision workflows (conversion, suppression, metrics, probing, planning, contrast), with no apparent bloat or trivial tools.

Completeness4/5

The tool surface covers the core calculation needs for bounding-box-based vision tasks: conversion, NMS, evaluation, image metadata, resize planning, and accessibility contrast. Missing features like actual image manipulation or geometric transforms are outside the stated 'maths' scope, so coverage is strong. One could argue for a tool that applies resize to boxes, but resize_plan already returns the transform parameters, which is sufficient.

Resources