Extract structured page data via a11y-snapshot
The agent retrieves a semantic, text-based representation of a webpage's interactive elements and content, enabling efficient data extraction without relying on visual screenshots or complex CSS selectors.
How it works
The agent connects to the cdpilot MCP server and uses the 'a11y-snapshot' command to capture the current page state. This command returns structured text with semantic elements and short @ref handles, allowing the agent to understand the page layout and content purely through text. This is useful for reading data or verifying page structure. The agent should check the snapshot output to ensure the relevant information is present and correctly identified before proceeding with any analysis or logging.
Prompt
Paste this into an agent that has the servers below connected. Adjust the names and dates to your own.
Connect to the cdpilot MCP server. Navigate to https://example.com. Run an a11y-snapshot to get the structured text view of the page. Return the text content of the main heading and the list of navigation links.MCP servers it needs
Source
The vendor page this playbook is drawn from, and the passage that supports it.
a11y-snapshot returns semantic elements with short @ref handles — the agent acts on text, not pixels.cdpilot — A lightweight Playwright alternative for AI agents | Raw CDP, MCP