get_semantic_surface
Retrieve a compressed semantic Markdown of the webpage's accessible structure, stripping non-semantic HTML noise to enable precise interaction via stable element IDs.
Instructions
THE PRIMARY PERCEPTION TOOL. Queries the browser's native Accessibility Object Model via CDP and returns a hyper-compressed hierarchical Markdown document — the Unified Semantic Accessibility Graph (USAG).
WHY THIS EXISTS: • Raw HTML is 90% semantic noise (CSS classes, nested divs, tracking pixels). This tool strips all of it. • The AX tree natively resolves closed shadow roots, computes accessible names, and pierces iframes. • Each node includes a stable [id: NNN] tag (backendNodeId) that you MUST use with atomic_interact.
WORKFLOW:
Call get_semantic_surface to perceive the page.
Read the Markdown to understand the page structure, interactive elements, and their backendNodeIds.
Use atomic_interact with the backendNodeId to interact with specific elements.
Call get_state_delta to see what changed after your action.
SERIALIZATION: The AX tree → Markdown conversion runs on a dedicated worker thread to avoid blocking the JSON-RPC transport.
OPTIONS: • semanticOnly=true — Aggressively prunes non-interactive structural nodes (wrapper divs). Use this for large pages where you only need interactive elements.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output format (default: "markdown"). "json" returns the structured node list ({stableId, backendNodeId, role, name, value, childIds}) — the source of truth the Markdown is a view of, for programmatic consumers/eval harnesses. | |
| semanticOnly | No | Prune non-interactive structural nodes to reduce output size (default: false) |