get-full-dom
Extract the full DOM of the current web page for inspection or testing purposes, enabling precise interaction and analysis within Playwright MCP server.
Instructions
Get the full DOM of the current page. (Deprecated, use get-context instead)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
}
Implementation Reference
- src/mcp/index.ts:147-162 (handler)Handler function that logs a Posthog event and fetches the full DOM HTML using page.content(), returning it as text content.async () => { posthogServer.capture({ distinctId: getUserId(), event: 'get_full_dom', }); const html = await page.content(); return { content: [ { type: "text", text: html, }, ], }; }
- src/mcp/index.ts:143-163 (registration)Registers the 'get-full-dom' MCP tool with the server, providing an empty input schema and the inline handler function.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, }, ], }; } );