Skip to main content
Glama
Pagewright (browser-mcp)

Pagewright (browser-mcp)

by zamansheikh

browser_audit_layout

Read-only

Scan a page for visual and layout bugs such as horizontal overflow, clipped text, covered elements, broken images, low contrast, tiny tap targets, console errors, and failed requests.

Instructions

Scan the page for visual and layout bugs: horizontal overflow and the elements causing it, content sticking out of its container, clipped text, elements covered by others, broken/stretched/oversized images, low color contrast, tiny text and tap targets, unlabeled controls, plus console errors and failed requests. Each issue has a ref for browser_inspect/browser_screenshot. Run it at several viewports (browser_set_viewport).

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

Input Schema

NameRequiredDescriptionDefault
tabIdNoTab to act on. Defaults to the tab last opened/selected by an agent, else the active tab.
maxPerTypeNoDefault 8.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true is consistent with a non-mutating scan, and the description adds real context beyond the annotation: it discloses the categories of findings, that each issue carries a ref for downstream tools, and that results are viewport-dependent. It does not state how many issues are returned or what happens when the maxPerType cap is hit, which is a minor omission.

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?

Front-loaded with the core action, followed by the check list, then two short sentences covering refs and viewport workflow. The long enumeration is dense but each item is a distinct detectable defect, so it earns its space; overall it stays tight for a tool with this many behaviors.

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 carries the burden of describing results, and it does so by naming the finding categories and the ref handle. It also supplies the cross-viewport workflow that makes the tool useful. A note on result volume or truncation would close the remaining gap.

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 description coverage is 100% and both parameters (tabId, maxPerType) are already documented there, so the baseline is 3. The description adds no meaning about tabId defaulting behavior or how maxPerType shapes the result set, so it does not exceed what the schema provides.

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 specific verb and resource ('Scan the page for visual and layout bugs') and then enumerates the exact defect classes it detects: horizontal overflow, clipped text, overlapping elements, broken images, contrast, tap targets, console errors and failed requests. An agent can tell instantly that this is a broad automated layout audit rather than the single-element lookups performed by browser_inspect or browser_screenshot.

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?

Gives clear operational context: run it at several viewports via browser_set_viewport, and pass the returned refs to browser_inspect/browser_screenshot for follow-up. It does not say when to skip this tool in favor of a single targeted check, so the exclusion side is left implicit.

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