Skip to main content
Glama

audit_layout

Audit the current page or CSS section at a set viewport for horizontal overflow, text clipping, unconstrained media, fixed widths, and overlaps, with severity ratings to prioritize fixes.

Instructions

Perform a comprehensive layout audit on the current page to detect horizontal overflow, text clipping, unconstrained media, rigid fixed widths, and overlapping elements with severity ratings (Critical, High, Medium, Low).

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

Input Schema

NameRequiredDescriptionDefault
selectorNoOptional CSS selector to scope layout audit to a section. Default audits entire page.
viewport_widthNoOptional viewport width in px to audit layout at (e.g. 375 for mobile).
viewport_heightNoOptional viewport height in px to audit layout at (e.g. 812).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the detection categories and severity ratings, but does not state that the operation is read-only, whether it mutates page state, or what the result looks like beyond "severity ratings." An agent still lacks confirmation of side effects and return shape before invoking it on a live page.

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 definition is a single, front-loaded sentence that spends its words on the audited defects rather than filler. The enumerated defect list is dense but each clause contributes to understanding what the tool checks, so it is appropriately sized for an audit tool.

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 annotations and no output schema, the description must carry more explanatory weight. It covers what is audited and the severity vocabulary, but does not explain the shape of returned findings, whether results are grouped per element, or how severities are assigned. This is adequate but leaves meaningful gaps for an agent interpreting results.

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%, so selector, viewport_width, and viewport_height are fully documented in the schema, including defaults and valid ranges. The description adds no parameter-level meaning beyond what the schema already provides, making the baseline 3 appropriate.

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?

States a specific verb and resource: "Perform a comprehensive layout audit on the current page." It also enumerates what the audit detects (overflow, clipping, unconstrained media, fixed widths, overlaps) and the severity scale. It does not differentiate itself from siblings such as detect_overflow or test_responsiveness, so it stops short of a 5.

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 "comprehensive layout audit" and the list of detectable defects, but there is no explicit when-to-use or when-not-to-use guidance. It never names alternatives like detect_overflow for a narrower check or compare_viewports for side-by-side analysis, leaving the agent to infer routing from tool names alone.

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