get_dom_snapshot
Retrieve outerHTML from an Electron renderer page or a specific element via CSS selector, with configurable truncation for performance.
Instructions
Get the outerHTML of a renderer page (or of a specific element via selector). Truncated to maxLength characters.
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": {
"sessionId": "<sessionId>",
"pageId": "<pageId>"
},
"name": "get_dom_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | Page id from list_pages. | |
| selector | No | CSS selector; defaults to the whole document. | |
| maxLength | No | Maximum characters to return (default 50000). | |
| sessionId | Yes | Session id returned by launch_app. |