Skip to main content
Glama

contrast

Idempotent

Check the color ratio of text, buttons, links and edges against their backgrounds in a GUI session to catch WCAG accessibility failures.

Instructions

Contrast measured on the screen, in each node's bounds: text, buttons and links against their background, images, and with edges, a button's or field's edge against what's round it; large text needs 3. A line each, the node as accessible_tree has it with its bounds, then the colors; then what wasn't measured, which doesn't fail (too small, or GTK 4's, whose positions are wrong), and why. Switches, sliders, check boxes and what's disabled are left out, and so is what's scrolled out of view.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
edgesNoLeast for edges (unchecked)
ignoreNoRegexes for lines that can't be fixed yet
windowNoA window's title, exactly or a regex matched in full, or app=RE for its app id
sessionYesIts name, from start_session
graphicsNoLeast for images (3)
text_ratioNoLeast for text (4.5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.6/5.0
Behavior4/5

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

The description goes well beyond the annotations, disclosing what is deliberately excluded (switches, sliders, check boxes, disabled controls, off-screen content), what is skipped without failing (too small, GTK 4 wrong positions), and the default thresholds. One tension worth noting: the passive 'measured' framing implies a read, yet readOnlyHint is false; this is mild and plausibly explained by internal screen capture, so it is not a hard contradiction.

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?

The core statements (what it measures, thresholds) are front-loaded, but the middle sentence is a dense run-on mixing output format, exclusions, and rationale. It is serviceable yet not tight; some clauses could be split or trimmed.

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

Completeness4/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 sketching the return shape ('a line each, the node as accessible_tree has it with its bounds, then the colors... then what wasn't measured, and why'). Combined with 100% schema coverage and explicit exclusions, an agent has nearly everything needed to call and interpret it, though the safety/mutation profile is left to annotations.

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%, so the schema already carries the parameter meaning and the baseline is 3. The description only tangentially reinforces parameter intent via threshold defaults ('large text needs 3'), adding no syntax or format detail beyond the schema.

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

Purpose4/5

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

It states a specific operation (contrast measurement on the screen) and enumerates exactly which node types are checked (text, buttons, links, images, edges), which lets an agent separate it from siblings like screenshot or accessible_tree. The framing is a bit passive ('Contrast measured...') rather than a clean verb+resource, but the resource and scope are unambiguous.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the thresholds ('large text needs 3') and the reference to accessible_tree make clear this is an accessibility-audit step, but there is no explicit 'use this when / use X instead' guidance. It never contrasts itself with lint or accessible_tree as the right tool for a given task.

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