Handle a dialog
browser_handle_dialogResolve pending JavaScript dialogs by accepting or dismissing them, invoked after the action that triggers alerts, confirms, prompts, or beforeunload.
Instructions
Accept or dismiss a pending JavaScript dialog (alert, confirm, prompt or beforeunload). Call it right after the action that opened the dialog.
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": {
"accept": "<accept>"
},
"name": "browser_handle_dialog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accept | Yes | Whether to accept the dialog | |
| promptText | No | Text to enter for a prompt dialog |