Skip to main content
Glama

check_contrast

Calculate WCAG contrast ratio between foreground and background hex colors to determine if text meets accessibility standards.

Instructions

Check WCAG color contrast ratio between foreground and background colors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundYesBackground color (hex)
foregroundYesForeground color (hex)
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It states the core computation but does not specify the output format (e.g., ratio number, pass/fail), how invalid hex colors are handled, or any other operational details. This leaves significant ambiguity about the tool's behavior.

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, concise sentence that front-loads the action and resource. Every word serves a purpose, and there is no redundant or tangential content.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with no output schema, the description covers the purpose but omits the return value and any edge-case behavior. Without an output schema, the agent must infer what the tool returns, which is a moderate gap. The simplicity of the tool partially compensates.

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 input schema provides 100% coverage with descriptions for both parameters ('Foreground color (hex)' and 'Background color (hex)'). The description only restates the roles of the parameters without adding deeper semantics such as format specifics, defaults, or constraints beyond what the schema already states.

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 uses a specific verb 'check' and identifies the resource as 'WCAG color contrast ratio' between foreground and background colors. It clearly distinguishes this from sibling tools like color_palette, which generates color palettes rather than checking 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?

The description clearly conveys that the tool is for computing WCAG contrast between two colors, giving a clear usage context. It does not explicitly mention alternatives or exclusions, but the use case is obvious from the title and description.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RockaRhymeLLC/bmobot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server