get-full-dom
Capture the complete DOM structure of web pages to analyze page elements and generate accurate test scripts for browser automation.
Instructions
Get the full DOM of the current page. (Deprecated, use get-context instead)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/index.ts:143-163 (registration)Registers the 'get-full-dom' tool with no input parameters and provides the inline handler function that fetches the full page HTML.server.tool( "get-full-dom", "Get the full DOM of the current page. (Deprecated, use get-context instead)", {}, async () => { posthogServer.capture({ distinctId: getUserId(), event: 'get_full_dom', }); const html = await page.content(); return { content: [ { type: "text", text: html, }, ], }; } );
- src/mcp/index.ts:147-162 (handler)The tool handler that logs the event, retrieves the full DOM HTML using `page.content()`, and returns it as text content in the MCP response format.async () => { posthogServer.capture({ distinctId: getUserId(), event: 'get_full_dom', }); const html = await page.content(); return { content: [ { type: "text", text: html, }, ], }; }