Skip to main content
Glama

Which error message belongs to which field — and which belongs to nothing

qa_wiring

Checks whether form error messages are actually wired to their fields, reporting orphaned messages and invalid fields with no reason given. Optionally draws the wiring as a PNG.

Instructions

A FORM WITH THREE RED MESSAGES UNDER THREE FIELDS LOOKS CORRECT TO EVERYONE WHO CAN SEE IT. That is the illusion: being NEAR a field is not being attached to it, and assistive technology reads the attachment. Somebody filling the form by ear is told «Email» and nothing else, while «Enter a valid email address» sits in red an inch below, invisible to them. Nobody can check this by looking, which is why it survives in shipped products for years. This reads the wire out of the tree — aria-errormessage, aria-describedby, label — and reports: which messages are attached to which fields, which messages are attached to NOTHING, and which fields are marked invalid with no reason given at all. Pass draw to get the picture: a line from every field to its message, and a stub on every message whose line ends in mid-air. It deliberately under-reports: a message inside its field's label, and an error summary that links to its fields, are both correct by another route and are not called orphans. A wrongly accused form costs somebody an afternoon proving the tool wrong.

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": "qa_wiring"
  }
}

Input Schema

NameRequiredDescriptionDefault
drawNoWrite a PNG here with the wiring drawn on the page: green lines for attached messages, red stubs for orphans
tabIdNoTarget tab (from qa_tabs); omit for the active tab

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.86.2

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses the attributes it reads and the false-positive exemptions, but never states that it is read-only (implied only by 'reads the wire out of the tree'), and the `draw` parameter writes a PNG file to disk without any note on overwrite behavior or path resolution. A mutation side effect plus an undocumented invocation mode is a real gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The rhetorical ALL-CAPS opening and the 'Nobody can check this by looking' paragraph delay the actual purpose statement, which arrives only in the fourth sentence. The under-reporting caveat and the aria attribute list earn their place, but roughly a third of the text is persuasion rather than operational information.

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?

With no output schema and no annotations, the description must stand alone; it does enumerate the three report categories, which is helpful, but it does not describe the shape of the returned data (fields, statuses, identifiers) or how orphan results are keyed. For a diagnostic tool whose whole value is its report, that is an incomplete picture.

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%, so the baseline is 3. The description does add interpretive meaning for `draw` — what the green lines and red stubs represent — but says nothing beyond the schema about `tabId`, and never clarifies whether drawing is additive to the textual report or an alternative to it.

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 core sentence — 'This reads the wire out of the tree — aria-errormessage, aria-describedby, label — and reports: which messages are attached to which fields, which messages are attached to NOTHING, and which fields are marked invalid with no reason given' — gives a specific verb, resource and three output categories. It never names a sibling (e.g. the general accessibility checker) to differentiate itself, so the agent must infer the boundary.

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?

Usage is implied by the scenario described (auditing form error messages) rather than stated as when-to-use/when-not-to-use, and no alternative tool is named. The 'deliberately under-reports' caveat (message inside its label, error summary that links to its fields) is genuinely valuable guidance on interpreting results, which lifts it above a bare 2.

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