ensure_active_tab
Ensures an active browser tab is available for automation. Reuses existing tabs, creates a new tab if none exist, and launches the default browser when needed.
Instructions
确保存在一个可用且激活的浏览器 tab。如果当前窗口已有 active tab 则直接复用;如果没有任何 tab 但浏览器进程仍在,则新建 tab;如果连窗口都没有,会按 platform 启动 Chrome(macOS: open -a Google Chrome;Linux: xdg-open;Windows: rundll32.exe url.dll,FileProtocolHandler)。本工具不会关 Chrome,不会结束浏览器进程;启动浏览器仅在显式调用本工具时发生。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | 可选:新建 tab 时要打开的 URL,缺省 about:blank | |
| browser | No | 缺省 chrome;auto 由系统决定,chrome/edge/brave 显式指定浏览器应用名(仅用于启动命令) |