pilot_tabs
List all open browser tabs with their IDs, URLs, titles, and active tab marker. Find a specific tab by title or URL to know which tab is active before switching.
Instructions
List all open browser tabs with their IDs, URLs, titles, and which tab is currently active. Use when the user wants to see what tabs are open, find a specific tab by title or URL, or check which tab is active before switching.
Parameters: (none)
Returns: Numbered list of tabs showing [id], title, URL, and an arrow (→) marking the active tab.
Errors: None — returns empty list if no tabs exist (unlikely in normal operation).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/tabs.ts:7-38 (handler)The `pilot_tabs` tool handler: lists all open browser tabs via extension or BrowserManager, returns tab IDs, titles, URLs, and marks the active tab.
server.tool( 'pilot_tabs', `List all open browser tabs with their IDs, URLs, titles, and which tab is currently active. Use when the user wants to see what tabs are open, find a specific tab by title or URL, or check which tab is active before switching. Parameters: (none) Returns: Numbered list of tabs showing [id], title, URL, and an arrow (→) marking the active tab. Errors: None — returns empty list if no tabs exist (unlikely in normal operation).`, {}, async () => { await bm.ensureBrowser(); try { const ext = bm.getExtension(); if (ext) { const tabs = await ext.send<Array<{ tabId: number; url: string; title: string; active: boolean }>>('tabs'); const text = tabs.map(t => `${t.active ? '→ ' : ' '}[${t.tabId}] ${t.title || '(untitled)'} — ${t.url}` ).join('\n'); return { content: [{ type: 'text' as const, text }] }; } const tabs = await bm.getTabListWithTitles(); const text = tabs.map(t => `${t.active ? '→ ' : ' '}[${t.id}] ${t.title || '(untitled)'} — ${t.url}` ).join('\n'); return { content: [{ type: 'text' as const, text }] }; } catch (err) { return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true }; } } ); - src/tools/tabs.ts:17-17 (schema)Schema for `pilot_tabs` — empty object (no parameters).
{}, - src/tools/register.ts:83-83 (registration)Registration of tab tools (including pilot_tabs) via registerTabTools(effectiveServer, bm).
registerTabTools(effectiveServer, bm); - src/tools/register.ts:43-43 (registration)`pilot_tabs` is listed in the STANDARD_TOOLS profile set, meaning it's available in the 'standard' and 'full' profiles but not in 'core'.
'pilot_tabs', 'pilot_tab_new', 'pilot_tab_close', 'pilot_tab_select',