Skip to main content
Glama

detect_overflow

Detect horizontal page overflow, elements wider than containers, media overflow, and clipped text at specific viewport sizes or within a CSS selector to find responsive layout issues.

Instructions

Identify horizontal page overflow, elements wider than their containers, content extending beyond viewport boundaries, fixed-width hazards, media overflow, and clipped text.

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

Input Schema

NameRequiredDescriptionDefault
selectorNoOptional CSS selector to scope detection. If omitted, checks the entire page.
viewport_widthNoOptional viewport width in px to check at (e.g. 375 for mobile).
viewport_heightNoOptional viewport height in px to check 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 burden. It discloses the diagnostic scope well, which implies a non-mutating inspection, but never states that the page is not modified, nor what the result looks like (a list of offending elements with coordinates?). For a no-annotation, no-output-schema tool these are real gaps.

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?

One front-loaded sentence with a dense enumeration of detection targets and no filler. The list form is slightly breathless but every item adds a distinct detectable symptom, so nothing is wasted.

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?

All three parameters are optional and fully documented in the schema, so invocation is unambiguous. However, for a diagnostic tool with no output schema, the agent is left guessing what a result entry contains and how to act on it; a sentence on return shape would complete the definition.

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%, with selector, viewport_width and viewport_height each documented including ranges and an example value. The description adds nothing about parameters, so the schema does all the work; baseline 3 applies.

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 ('identify') plus a concrete, enumerated set of detectable conditions: horizontal overflow, elements wider than containers, viewport-exceeding content, fixed-width hazards, media overflow, clipped text. An agent knows exactly what class of problem it surfaces. It does not explicitly differentiate itself from siblings like audit_layout or test_responsiveness, keeping it at 4.

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 only implied by the problem list — the agent can infer you call this when debugging layout breakage. There is no explicit when-to-use vs. when-not, no mention of audit_layout or test_responsiveness as alternatives, and no note that the selector parameter is the way to narrow scope to one component.

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