pilot_tab_close
Close browser tabs by ID to manage browser sessions and reduce clutter. Specify a tab ID to close it, or close the current tab if no ID is provided.
Instructions
Close a browser tab by ID (or current tab if none specified).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Tab ID to close |
Implementation Reference
- src/tools/tabs.ts:40-53 (handler)Implementation of the pilot_tab_close tool handler.
server.tool( 'pilot_tab_close', 'Close a browser tab by ID (or current tab if none specified).', { id: z.number().optional().describe('Tab ID to close') }, async ({ id }) => { await bm.ensureBrowser(); try { await bm.closeTab(id); return { content: [{ type: 'text' as const, text: `Closed tab${id ? ` ${id}` : ''}` }] }; } catch (err) { return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true }; } } );