analyze_page_structure
Extracts a page's section band map via headless browser from live URLs or local files, so you can compare a reference site against your build and inspect mobile responsive differences.
Instructions
Extract a page's section band map (tag, label, background color, offset, height per band) via a headless browser, plus a conservative scrollMode (always present: document, element, virtual or canvas); virtualRoot appears only with virtual, and note only with canvas; virtualRoot is a label, not a guaranteed selector or replay root. Works on live URLs and file:// paths — use it to compare a reference site's structure against your local build. compare:"mobile" also captures at 390×844 and returns mobileBands + diff {heightDelta, bandsAdded, bandsRemoved, reordered} plus responsive evidence: horizontal overflow, small text and small tap targets. cdpEndpoint instead attaches to a browser you started (AWWWARDS_MCP_ATTACH=1) and scans the already-open matching page: it never navigates, scrolls, clicks or creates tabs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "analyze_page_structure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL (https:// or file://) of the page to analyze | |
| compare | No | Also capture at 390×844 (mobile): adds mobileBands + diff; if the mobile capture fails you still get the desktop result plus mobileError; absent keeps the desktop response unchanged | |
| maxBands | No | Cap on returned bands | |
| viewport | No | desktop = 1440x900 (default); mobile = 390x844 iPhone-class with deviceScaleFactor 3, isMobile + hasTouch | desktop |
| publicOnly | No | Refuse private/loopback/metadata destinations and route browser captures through the pinned public-address guard; cannot be combined with cdpEndpoint | |
| cdpEndpoint | No | Attach to a browser YOU started (requires AWWWARDS_MCP_ATTACH=1): loopback CDP endpoint (http://127.0.0.1:9222, http://[::1]:9222, or ws://127.0.0.1:9222/devtools/browser/<id>; an http endpoint is resolved via /json/version and its ws URL re-validated before connecting). Selects an already-open page whose URL matches exactly - never navigates, scrolls, clicks or creates tabs - and disconnects without closing it. Not available with compare or a non-desktop viewport | |
| waitStrategy | No | 'load' + settle works on heavy sites; 'networkidle' waits for total quiet | load |