---
name: browser
label: Browser Control
description: Control connected Chrome browser tabs via the Officer Browser Relay. Use this tool to list tabs, take screenshots, navigate to URLs, evaluate JavaScript, get page info, activate (focus) tabs, or close tabs. Requires the user to have connected the Browser Relay extension in Settings → Integrations.
language: typescript
inputs:
  action:
    type: string
    description: "Action to perform: list_tabs, screenshot, navigate, evaluate, page_info, activate, close"
  tab_id:
    type: string
    description: Target tab ID. Optional — defaults to the first connected tab.
    optional: true
  url:
    type: string
    description: URL to navigate to (required for navigate action)
    optional: true
  expression:
    type: string
    description: JavaScript expression to evaluate in the tab (required for evaluate action)
    optional: true
---

# Browser Tool

Control the user's Chrome browser tabs through the Officer Browser Relay and Chrome DevTools Protocol.

## Available Actions

- **list_tabs**: List all connected tabs with their title, URL, and ID.
- **screenshot**: Capture a screenshot of a tab. Returns the image directly. Use this when asked about page content.
- **navigate**: Navigate a tab to a URL. Requires `url`.
- **evaluate**: Run JavaScript in a tab and return the result. Requires `expression`.
- **page_info**: Get the title and URL of a tab.
- **activate**: Bring a tab to the foreground (focus it).
- **close**: Close a tab.

## Tips

- When asked about what's on a page, take a screenshot first.
- Use `evaluate` for extracting structured data from pages (DOM queries, reading text content, etc.).
- If no `tab_id` is provided, the first connected tab is used.
- Tab IDs can be obtained from `list_tabs`.
