session_dialog
Inspect or change how browser session dialogs (alert/confirm/prompt) are answered. Dialogs auto-dismiss by default, log to console; list policy, accept to return text, or dismiss.
Instructions
Inspect or flip the session's dialog policy for window.alert/confirm/prompt. Dialogs never block the page: each is auto-answered (default dismiss) and logged into session_console at level "dialog". action "list" reports {policy, prompt_text, dialogs}; "accept" makes subsequent confirm() true and prompt() return prompt_text (or the call's default argument); "dismiss" restores the default.
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": {
"session_id": "<session_id>",
"action": "<action>"
},
"name": "session_dialog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | "list" reports the policy and dialog history; "accept"/"dismiss" set the answer applied to subsequent window.confirm/prompt calls (alert is always logged, never blocking). | |
| session_id | Yes | Session ID | |
| prompt_text | No | With action "accept": text window.prompt returns once accepted (omitted keeps the current text). |