对话框应答策略
browser_dialog_respondControls what window.confirm and window.prompt return so you can test flows that need confirmation or text input; set accept/cancel values, prompt text, one-time or persistent policy, and reset.
Instructions
Decide what the next (or every following) window.confirm / window.prompt returns, so flows that need confirmation or text input can be tested. Set confirm:true to accept, confirm:false to cancel, prompt:"text" to answer a prompt (prompt with no value returns null). Default is once:true — the policy is consumed by the next dialog; pass once:false to keep it. Pass reset:true to clear the policy.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_dialog_respond"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| once | No | Consume the policy after the next dialog (default true) | |
| reset | No | Clear any policy and restore the default (confirm→false, prompt→null) | |
| tabId | No | Tab id (default: active tab) | |
| prompt | No | What window.prompt returns as the entered text | |
| confirm | No | What window.confirm returns (true = accept, false = cancel) |