Skip to main content
Glama

page.audit_layout

Measures pages at multiple viewport widths to detect horizontal overflow, touch targets below minimum size, and clipped text, clarifying responsive layout issues screenshots cannot reveal.

Instructions

Measure a page at several viewport widths and report what is actually broken: horizontal overflow (outermost offender only), touch targets under the minimum size, and clipped text. Answers responsive questions that a screenshot leaves to guesswork. Viewport emulation is always cleared afterwards.

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": "page.audit_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsNoAudit these URLs in turn. Omit to audit the current page.
heightNoViewport height for every width. Default 800.
widthsNoCSS widths to test. Default [320, 414, 768, 1280].
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
min_touch_targetNoSmallest acceptable interactive dimension in CSS px. Default 24.
device_scale_factorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: only the outermost overflow offender is reported (a scoping decision that affects interpretation), and viewport emulation is always cleared afterwards, which explains why readOnlyHint=false on an otherwise read-like audit. It does not cover cost, timeouts, or how many widths it will actually run before giving up.

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?

Three sentences, each carrying a distinct payload: what it measures, what it reports, why it beats a screenshot, and the cleanup guarantee. The report contents are front-loaded and nothing is redundant.

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 and seven optional parameters, the description does the heavy lifting by naming the three finding categories the agent will get back. It omits the shape of the result (per-width grouping, ordering, counts) and multi-URL aggregation behavior, which leaves a modest gap for a batch-capable audit tool.

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 86%, so the schema already documents urls, widths, height, target_id, browser_id, and min_touch_target with their defaults. The description adds no syntax or format detail beyond restating that widths and a minimum touch size exist; the undocumented device_scale_factor is not covered either. Baseline 3 is appropriate.

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?

Specific verb ('Measure') plus resource ('a page at several viewport widths') plus an explicit enumeration of what it reports: horizontal overflow, undersized touch targets, clipped text. The closing line contrasts it against page.screenshot, so an agent can distinguish it from the sibling that also inspects a page without opening either 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?

Gives a clear selection context: use this when a responsive question would otherwise be guesswork from a screenshot. It does not spell out exclusions or point at related siblings like set_viewport for one-off emulation, so it stops short of full when/when-not guidance.

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

Deploy Server

Other Tools