Files
platform/seed/tools/browser/TOOL.md
T
pastilhasandClaude Opus 4.6 4d30672adb browser relay: multi-session override, stale session recovery, better error feedback
- relay accepts new extension connections by closing old one (last wins, code 4000)
- extension recognizes code 4000 and stops auto-reconnect (shows "replaced" badge)
- fix ping interval race where old WS close handler killed new connection's pings
- retry CDP commands on "Session with given id not found" by re-attaching debugger
- describeError() maps known errors to user-friendly badge tooltips
- persisted relay tokens restored on server start
- user-scoped token salts, token regeneration/deletion endpoints
- extension download endpoint, integrations UI for browser relay setup
- browser relay env vars passed to pi-bridge sandboxes
- browser screen layout with chat panel and prompt prefix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:22:15 +00:00

44 lines
1.8 KiB
Markdown

---
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`.