Skip to main content
Glama

명도 대비 계산

check_contrast
Read-only

Calculate the luminance contrast ratio between text and background colors, then determine if it passes KWCAG 5.4.3 (1.4.3) accessibility criteria.

Instructions

두 색상 사이의 명도 대비를 계산하고 KWCAG 5.4.3(1.4.3) 기준 통과 여부를 판정한다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boldNo
backgroundYes배경 색. hex/rgb()/rgba()/hsl()/hsla()/CSS 색 이름
fontSizePxNo
foregroundYes전경(텍스트) 색. hex/rgb()/rgba()/hsl()/hsla()/CSS 색 이름

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
aaYes
aaaYes
aliasYes
kwcagYes
ratioYes
largeTextYes
thresholdYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

The description discloses the core behavior beyond the readOnlyHint annotation: it not only calculates a ratio but also returns a pass/fail judgment against a specific standard. It does not contradict the read-only annotation. Though it does not discuss invalid color handling or alpha edge cases, the read-only nature and output schema lower the burden, and the stated behavior is accurate and useful.

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, front-loaded sentence with no filler. It states the action, the object, and the evaluation standard, and every element contributes to agent understanding.

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 relatively simple two-color contrast checker, the description covers the essential purpose and standard, while required parameter formats are provided in the schema and return semantics are presumably covered by the output schema. The only notable gap is the lack of sibling comparison or explicit when-to-use guidance, but for this isolated utility the description remains sufficiently 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?

The schema already documents foreground/background color formats well, covering 50% of parameters. The description adds the KWCAG criterion context but does not explain the effect of bold and fontSizePx on the threshold determination. The optional parameter semantics are mostly left to their names, defaults, and common knowledge, so the description provides only modest extra meaning over the schema.

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 what the tool does: it calculates the luminance contrast between two colors and determines whether the contrast passes KWCAG 5.4.3(1.4.3). The verb 'calculates' and 'judges' alongside the specific resource '두 색상 사이의 명도 대비' make the purpose unambiguous and distinguish it from sibling tools like check_html or audit_url.

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?

The description implies usage in accessibility contrast-checking contexts via the KWCAG reference, but it does not explicitly state when to use check_contrast versus alternatives such as check_html or audit_url, nor does it provide exclusions. The intended use case is reasonably inferable, but the guidance is left to implication rather than explicit direction.

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

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/SWJoong/SWWA'

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