browser_handle_dialog
browser_handle_dialogAccept or dismiss a JavaScript alert, confirm, or prompt in a browser tab so page automation can continue. Provide prompt text when accepting a prompt dialog.
Instructions
Accept or dismiss a JavaScript alert, confirm, or prompt. Supply prompt_text when accepting a prompt.
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": {
"tab_id": "<tab_id>",
"action": "<action>"
},
"name": "browser_handle_dialog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| tab_id | Yes | Chrome tab ID. | |
| session_id | No | Session that owns the tab. Pass it on every call so the runtime can refuse a tab another session holds. | |
| prompt_text | No | ||
| session_name | No | Name for this conversation's Chrome tab group, so the tab bar reads as the task instead of a generated id. Sticky: pass it once when the name becomes clear, and again only to rename. |