dom_query
Extract properties from the first DOM element that matches a CSS selector in a browser tab using the Chrome DevTools Protocol, solving the need to quickly inspect specific page elements.
Instructions
Query the first element matching a CSS selector and return its properties.
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": {
"targetId": "<targetId>",
"selector": "<selector>"
},
"name": "dom_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector to query | |
| targetId | Yes | Target ID of the tab |