handle_dialog
Accept or dismiss JavaScript dialogs like alert, confirm, prompt, and beforeunload during browser debugging, with optional text entry for prompt dialogs.
Instructions
Handle a JavaScript dialog (alert, confirm, prompt, beforeunload).
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": "handle_dialog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accept | Yes | Whether to accept (true) or dismiss (false) the dialog | |
| promptText | No | Text to enter for prompt dialogs |