browser_handle_dialog
Resolve JavaScript dialogs (alert, confirm, prompt) that block browser tab execution. Accept or dismiss dialogs to unblock scripts and continue automated web interactions.
Instructions
[Disabled] Handle a JavaScript dialog (alert, confirm, prompt) that is blocking all script execution in a tab. JS dialogs (alert(), confirm(), prompt()) freeze the entire page until dismissed — no other browser tools will work while a dialog is open. Use action "accept" to confirm/dismiss alerts, "dismiss" to cancel. For prompt() dialogs, provide promptText with the text to enter before accepting. Common scenario: a tool call times out or errors because a dialog appeared — call this tool to dismiss it, then retry the original action.
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": {
"tabId": "<tabId>",
"action": "<action>"
},
"name": "browser_handle_dialog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | Yes | Tab ID of the page with the dialog | |
| action | Yes | Whether to accept (OK/Yes) or dismiss (Cancel) the dialog | |
| promptText | No | Text to enter in prompt() dialogs before accepting. Ignored for alert/confirm. |