Skip to main content
Glama

check_contrast

Checks if text and background colors meet WCAG AA/AAA contrast, returning ratio, level, and correction suggestions when contrast fails.

Instructions

Verifica se um par de cores tem contraste adequado (WCAG AA/AAA). Use sempre que definir cor de texto sobre fundo. Retorna ratio, nível WCAG e sugestão de correção se falhar.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
largeTextNoSe é texto grande (>18px ou >14px bold) — threshold menor
backgroundYesCor do fundo em hex: ex #FAFAF9
foregroundYesCor do texto em hex: ex #1A1917
Behavior4/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It discloses the return values (ratio, WCAG level, correction suggestion) and conditional behavior when contrast fails, which is sufficient for a read-only check tool. However, it does not mention error handling or color-format validation.

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 concise and front-loaded: three short sentences each add value, with no fluff or repetition. It communicates purpose, usage context, and return behavior efficiently.

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?

For a simple 3-parameter tool with no output schema and no annotations, the description covers the essential context: purpose, use case, and return semantics. It does not explicitly describe the role of the optional largeText parameter, but the schema already explains it, so the description is largely complete.

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 input schema already documents all parameters. The description adds no additional meaning beyond what the schema provides, such as how largeText affects thresholds or format constraints, so the baseline score of 3 is appropriate.

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 a specific action ('Verifica se um par de cores tem contraste adequado') targeting a concrete resource (color pairs) with an explicit standard (WCAG AA/AAA). It also distinguishes itself through the text-on-background use case, separating it from sibling tools like audit_color_pairs.

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 provides explicit guidance on when to use the tool: 'Use sempre que definir cor de texto sobre fundo.' This gives clear context but does not mention when not to use it or name specific alternatives, so it falls short of a 5.

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/Pedro21062014/ui-polish-mcp'

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