Skip to main content
Glama

Text spacing check (WCAG 1.4.12)

check_text_spacing
Read-only

Simulates WCAG text spacing overrides to detect clipped or overlapping text in fixed-height or fixed-width elements such as buttons, cards, and headings.

Instructions

Overrides line height to 1.5, paragraph spacing to 2em, letter spacing to 0.12em and word spacing to 0.16em, then compares before and after to detect text that becomes clipped or starts to overlap. Finds the problems typical of buttons, cards and headings with a fixed height or width.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "check_text_spacing"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesURL of the page to check (http, https or file). A dev server such as http://localhost:3000/ works too.
widthNoViewport width in CSS px. Default 1280.
heightNoViewport height in CSS px. Default 720.
waitMsNoExtra time to wait after load, in milliseconds.
waitForSelectorNoAfter load, wait until an element matching this CSS selector appears. Use it to wait for an SPA to render.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds the substantive behavior: which CSS properties get overridden, that a before/after comparison is performed, and what failure looks like (clipping, overlap). It leaves minor gaps — whether the page is restored afterward and roughly what the findings look like — but goes well beyond the annotations.

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?

Two sentences, no filler, and the operative mechanism is front-loaded before the payoff. Every clause carries information an agent can act on.

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 should convey the nature of the result, and it does so at a high level (text that becomes clipped or starts to overlap). Combined with fully documented parameters and read-only annotations, an agent has enough to invoke it correctly; only the exact result shape is left implicit.

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 100%, with url, width, height, waitMs and waitForSelector all documented in the schema including defaults and ranges. The description adds no parameter-level meaning, so the baseline 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 names a specific technique (override line height 1.5, paragraph 2em, letter 0.12em, word 0.16em) and the resulting check (compare before/after for clipped or overlapping text), tying it to WCAG 1.4.12. An agent knows exactly what the tool does, though nothing in the text distinguishes it from siblings like check_reflow or check_presentation.

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 final sentence implies the useful context — buttons, cards and headings with fixed height or width — which tells the agent when this check pays off. It stops short of stating when not to use it or naming a sibling alternative for broader layout checks.

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