query_elements
Find DOM elements by CSS selector with depth filtering. Retrieve tag, text, id, classes, and visibility for targeted inspection.
Instructions
Find elements by CSS selector with DOM depth filtering. Returns tag, text, id, classes, visibility.
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": {
"selector": "<selector>"
},
"name": "query_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max elements to return | |
| selector | Yes | CSS selector (e.g., ".class", "#id", "button") | |
| max_depth | No | Max DOM depth from body (default: 3, max: 10) | |
| connection_id | No | Chrome connection to use |