Skip to main content
Glama

analyze_page_structure

Read-onlyIdempotent

Extract a page's section band map—tag, label, background color, offset and height per band—from live URLs or file:// paths to compare a reference site's structure with your local build.

Instructions

Extract a page's section band map (tag, label, background color, offset, height per band) via a headless browser. Works on live URLs and file:// paths — use it to compare a reference site's structure against your local build.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute URL (https:// or file://) of the page to analyze
maxBandsNoCap on returned bands
viewportNodesktop = 1440x900 (default); mobile = 390x844 iPhone-class with deviceScaleFactor 3, isMobile + hasTouchdesktop
waitStrategyNo'load' + settle works on heavy sites; 'networkidle' waits for total quietload

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • addedInput schema / properties / viewport
      Added value: +{
      +  "default": "desktop",
      +  "description": "desktop = 1440x900 (default); mobile = 390x844 iPhone-class with deviceScaleFactor 3, isMobile + hasTouch",
      +  "enum": [
      +    "desktop",
      +    "mobile"
      +  ],
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world). The description adds non-obvious behavioral context: it runs via a headless browser and accepts local file:// paths, which tells the agent this fetches and renders remote/local content. It stops short of noting timing/cost or pagination behavior, but that gap is minor given the annotations.

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?

Two tight sentences, front-loaded with the action and output shape, followed by scope and intended use. Every clause earns its place with no redundancy.

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 usefully compensates by enumerating the per-band fields returned. Combined with the schema's full parameter coverage, an agent has enough to call it correctly, though return-format details (ordering, error shape) are not spelled out.

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 the schema already documents url, maxBands, viewport, and waitStrategy in detail. The description's field list describes the OUTPUT shape rather than adding meaning to the parameters, so 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?

States a specific verb (extract) and resource (a page's section band map) and enumerates the returned fields (tag, label, background color, offset, height per band). This clearly distinguishes it from siblings like capture_live_site, get_site_elements, and compare_sites, which operate on different data.

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?

It names a concrete use case — comparing a reference site's structure against a local build — and clarifies it accepts both live URLs and file:// paths. However, it does not explicitly state when NOT to use it or name the sibling alternative for the comparison workflow (e.g. compare_sites).

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