browser_handle_dialog
Set how the next browser dialog (alert, confirm, prompt, beforeunload) is handled by accepting or dismissing it, with optional prompt text, before triggering the dialog.
Instructions
Register how the NEXT JavaScript dialog (alert/confirm/prompt/beforeunload) is handled: accept or dismiss, with optional prompt text. Call this before the action that triggers 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 (true) or dismiss (false) the next dialog. | |
| promptText | No | Text to enter for a `prompt` dialog when accepting. |