Query elements
browser_queryFind web elements by role, name, text, or CSS selector and get compact match details with visible/enabled state, bypassing full snapshots.
Instructions
Finds elements by role+name, visible text, or CSS, and returns a compact line per match including its ref and visible/enabled state. Use this instead of a full snapshot when you already know what you are looking for.
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>"
},
"name": "browser_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | CSS selector to match. | |
| name | No | Accessible name to match alongside role. | |
| role | No | ARIA role, e.g. "button". | |
| text | No | Visible text to match. | |
| limit | No | Max matches (default 10). | |
| sessionId | Yes | Session id returned by browser_start. |