Skip to main content
Glama

Audit a page for suspicious visual conditions

visual_audit

Renders a page across CSS-derived viewports and returns ranked suspicious visual findings—invisible text, clipping, overlaps, overflow, contrast—each with a question for you to judge.

Instructions

Renders a URL at a matrix of viewports derived from the project's own CSS breakpoints and returns a ranked index of EVERYTHING that looked suspicious: invisible text, clipping, overlaps, occlusion, overflow, off-screen elements, contrast, zero-size content. It does not decide what is a bug — each finding carries a question for you to answer. Returns no images (use visual_describe for those). Reserved health: fast=1 pass and no info-level rules; deep=multiple passes, info-level rules, more viewports.

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

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute URL, path relative to baseUrl, or local HTML file path (read from the filesystem if it exists).
modeNofast (default) = 1 pass, geometry only. deep = repeat passes and include info-level rules.
rulesNoRestrict to specific rules. Available: zero-size-with-content, overflow-clipped, overlap-static-siblings, interactive-occluded, element-offscreen, document-horizontal-overflow, text-truncated, text-spills-outside-box, fill-available-indefinite-height, tiny-hit-target, visually-hidden-pattern, text-same-as-background, low-contrast, invisible-text, forced-colors-shadow-only, forced-colors-background-image.
engineNoRendering engine. Default from config (chromium). Use webkit to audit what Safari users see.
viewportsNoOverride the derived viewport matrix. Omit to derive it from CSS breakpoints.
conditionsNoRendering conditions to audit under. Each one costs a full viewport sweep. pseudo-i18n inflates every word by 40% to find layouts that only work in English; text-zoom scales the root font to 200%. Default: config (['default']).
maxFindingsNoBudget of findings to return (default from config, 40).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.3

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses that output is a ranked index with no images, that verdicts are deferred to the caller, and it pre-announces the cost of the conditions parameter ('Each one costs a full viewport sweep'). The fast/deep semantics are spelled out in terms of passes, info-level rules, and viewport count. What is missing is operational context — whether a dev server or auth must already be running, and rough latency for a matrix sweep.

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?

The most important facts — what it renders, what it returns, and that it is not a bug oracle — come first, and the dense catalogue of finding types earns its space by setting expectations for output. The trailing 'Reserved health: fast=1 pass…' fragment is telegraphic and slightly awkward to parse, which is the only real structural blemish on an otherwise tight block.

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 seven-parameter tool with no output schema and no annotations, the definition covers the essentials: what triggers the scan, how the viewport matrix is produced, what kinds of findings come back, and that each finding is a question rather than a verdict. The gap is downstream — it never hints at how a finding's question gets answered or which sibling consumes it, leaving the agent to infer the loop.

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, and the description mostly echoes what the schema already documents for mode and viewports ('derived from CSS breakpoints' appears in both). The distinctive addition is the rule taxonomy — the finding categories listed in prose map to what the rules array actually filters — but that overlaps the enum already present in the schema. Useful reinforcement rather than net-new meaning.

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?

States a concrete verb and resource — renders a URL at a viewport matrix derived from the project's CSS breakpoints and returns a ranked index of suspicious visual conditions — and then enumerates the finding classes (invisible text, clipping, overlaps, occlusion, overflow, contrast, zero-size content). It explicitly distinguishes itself from visual_describe by declaring 'Returns no images (use visual_describe for those)', so an agent can pick between the two without opening a schema.

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?

Explains the operative context clearly: it surfaces candidates but 'does not decide what is a bug — each finding carries a question for you to answer', which tells the agent this is a triage step in a larger loop. It also names the alternative for screenshots. It stops short of routing to the other obvious follow-ups (recheck, suppress, compare), so when-to-use is clear but the surrounding workflow is only partially mapped.

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