Query DOM
query_domReturn outer HTML of elements matching a CSS selector to identify the exact targets to click or type into and verify what is on the page.
Instructions
Return the outer HTML of every element matching a CSS selector (capped). Use to locate the exact elements to click or type into, and to confirm what is actually on the page.
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": {
"target_id": "<target_id>",
"selector": "<selector>"
},
"name": "query_dom"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max matches to return (default 20). | |
| selector | Yes | CSS selector, e.g. 'button.submit' or '[data-testid=login]'. | |
| target_id | Yes | Target id from list_targets — the page / webview / Electron window to inspect. |