Add preview_close so agents can release collaborative browser tabs #8887
solomonneas
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Add a
preview_closetool so an agent can release a collaborative browser tab it created. There is currently no way to close a tab from the MCP surface.Problem
The preview toolkit exposes 14 tools (
preview_open,preview_status,preview_navigate,preview_snapshot,preview_click,preview_type,preview_press,preview_scroll,preview_wait_for,preview_evaluate,preview_resize,preview_set_appearance,preview_recording_start,preview_recording_stop). None of them closes a tab.preview_opendefaults toreuseExistingTab: true, so ordinary use stays on one tab and the gap is easy to miss. But the documented way to work with more than one page at a time isreuseExistingTab: false, and every tab created that way persists for the lifetime of the server. An agent that opens a second tab to compare two pages, or that is told to isolate a flow from the user's current tab, has no way to clean up after itself. The tabs accumulate silently across a long session.The asymmetry is the awkward part: the tool surface can create unbounded state but cannot release any of it. The human can close a preview panel in the UI, so the capability exists; it is just not reachable from the agent side.
Proposed behavior
tabIdoptional, defaulting to the agent session's current tab, matching every other tool in the family.A narrower alternative that would also solve the accumulation problem: have tabs created with
reuseExistingTab: falsebe scoped to the thread and torn down when the thread ends.Notes
Version
0.0.38-nightly.20260831.1236. Found while auditing the preview tools; unlike #3713, #3714, and #3717 this one is a missing capability rather than a defect, and it is low severity on its own. Originally opened as issue #8886 before I read CONTRIBUTING; closed and moved here, since feature requests belong in Ideas.All reactions