Chrome Tabs

Chrome Tabs

kazuph

Integrates with Chrome on macOS to view and manage browser tabs through AppleScript automation. Requires accessibility permissions to control Chrome tabs.

11337 views8Local (stdio)

What it does

  • Get all open Chrome tabs with titles and URLs
  • Close specific tabs using stable unique IDs
  • Activate and focus specific tabs
  • Manage tabs across multiple Chrome windows

Best for

macOS users wanting to automate Chrome tab managementOrganizing and cleaning up browser sessionsBuilding Chrome workflow automation tools
macOS onlyRequires Chrome accessibility permissionsStable tab IDs prevent accidental closures

Tools (4)

get_tabs

Get all open tabs from Google Chrome browser with unique tab IDs. Each tab has a stable, unique ID that persists across browser operations. Output shows both display format (1-1, 1-2) and Tab ID [Tab ID: 1234567890] for each tab. ALWAYS use the Tab ID number for reliable operations.

close_tab_by_id

πŸ”₯ PREFERRED METHOD: Close a specific tab in Google Chrome using its unique tab ID. IMMUNE to tab reordering, window changes, and index shifting. Extract the Tab ID from [Tab ID: 1234567890] in get_tabs output. Example: if tab shows '[Tab ID: 1594670961]', use tabId: 1594670961

activate_tab_by_id

πŸ”₯ PREFERRED METHOD: Activate (focus) a specific tab in Google Chrome using its unique tab ID. Brings the tab to the front and makes it active. Extract the Tab ID from [Tab ID: 1234567890] in get_tabs output.

close_tab

⚠️ LEGACY DANGER: Close a specific tab using window/tab index. HIGH RISK of closing wrong tabs due to index shifting when tabs are reordered/closed. STRONGLY DEPRECATED: Use close_tab_by_id instead. Only use if Tab ID is unavailable.

Alternatives