ui_dialog
ui_dialogAnswer native browser dialogs (alert, confirm, prompt, beforeunload) during Playwright UI automation, choosing accept or dismiss and supplying prompt text so blocked tool calls can continue.
Instructions
Answer a native browser dialog (alert, confirm, prompt, beforeunload). When a tool call opens one, its reply says "Browser is waiting on a dialog" and every other tool is refused until you answer here. accept = OK / Leave; dismiss = Cancel / Stay; for a prompt add text. The reply also reports what the interrupted action did next. With no dialog waiting, this pre-sets the answer for the NEXT dialog, which is then answered at once (one answer, used once). An unanswered dialog is dismissed after a safety timeout.
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": {
"action": "<action>"
},
"name": "ui_dialog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text to enter into a prompt dialog (accept only) | |
| action | Yes | accept = OK / Leave; dismiss = Cancel / Stay | |
| session_id | No | Which open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open. |