click_role
Click a web element by its ARIA role and accessible name. Returns a candidate list when multiple elements match to prevent incorrect clicks.
Instructions
Click element by ARIA role and name. Same ambiguity guard as click_text: several matches → candidate list, not a guess.
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": {
"role": "<role>"
},
"name": "click_role"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Accessible name | |
| role | Yes | ARIA role (button, link, textbox, etc.) | |
| index | No | Which match to click when several match (0-based). -1 = require a unique match. | |
| within | No | Limit the search: "@dialog", "ref:e5", or a CSS selector. |