Skip to main content
Glama

ページのコントラスト検査

contrast_scan

Scans rendered text colors against backgrounds, flags WCAG AA/AAA contrast failures by font size, and separates text over images or gradients for manual review.

Instructions

ページ内の表示されているテキストの文字色と背景色を調べ、文字サイズに応じた基準でコントラスト不足の箇所を一覧にする。背景画像やグラデーションの上の文字は「要目視確認」として分ける

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "contrast_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo検査する URL。省略すると現在開いているページを検査
levelNoAA
selectorNo検査範囲を絞る CSS セレクタ

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It does add real context: the scan reports a list of failures, and text over background images or gradients is split out as 'requires visual confirmation' instead of being scored, which tells the agent to expect a partially indeterminate result. It omits whether the tool is read-only by contract, whether it navigates or requires an already-open page, and what the result structure looks like.

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?

Two sentences, front-loaded with the core action and followed by the important edge-case behavior. Nothing is redundant, though the second sentence is dense enough that the key 'requires visual confirmation' category could be surfaced more prominently.

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 three-parameter tool with no annotations and no output schema, the description covers purpose and result categorization but leaves the return shape unexplained, since no output schema exists to do it. It also never clarifies the level parameter or the page-state prerequisite, so the agent has gaps to close before calling it confidently.

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 coverage is 67%, with url and selector documented in-schema and the AA/AAA level left as a bare enum with only a default. The description adds no parameter meaning at all: it never mentions the level distinction or how font-size-dependent thresholds interact with AA versus AAA, nor how selector narrows the scan. The schema does most of the work, so the baseline of 3 applies.

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?

The description states a specific verb and resource: it inspects the foreground and background colors of visible text and lists the spots where contrast is insufficient, using thresholds that depend on font size. This is concrete enough to separate it from a single-pair ratio calculator, but it never names a sibling or explicitly says what it is not.

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 intended use, auditing a rendered page for text contrast problems, is implied by the whole description, and omitting 'url' to inspect the current page is stated in the schema rather than in the description. There is no guidance on when to choose this over alternatives such as contrast_ratio or axe_scan, and no stated prerequisites, for example that a page must already be loaded.

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