browser_open
Open a URL in Firefox with optional headless mode, mobile viewport emulation, and automatic capture of JavaScript errors, console output, and network requests via WebDriver BiDi.
Instructions
Open URL in Firefox. Starts a new browser session if none is running.
With enable_bidi=True (default) the session automatically captures: • All JavaScript exceptions (file, line, column, stack trace) • All console.* output (log / warn / error / info / debug) • All network requests with status codes and durations
To test responsive / mobile layouts pass width + height (and optionally user_agent): width=390 height=844 — iPhone 14 width=375 height=667 — iPhone SE width=360 height=800 — Samsung Galaxy S21 width=768 height=1024 — iPad width=1280 height=800 — laptop
geckodriver sources (priority order):
GECKODRIVER_PATH env → 2. apt install gecko-driver → 3. webdriver-manager
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to open (default: about:blank) | about:blank |
| width | No | Viewport width in pixels. 0 = browser default. E.g. 390 for iPhone 14. | |
| height | No | Viewport height in pixels. 0 = browser default. E.g. 844 for iPhone 14. | |
| headless | No | Headless mode (no visible window) | |
| user_agent | No | Override the browser User-Agent string. Useful for mobile emulation so sites that sniff the UA serve their mobile layout. E.g. 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1' | |
| enable_bidi | No | Enable WebDriver BiDi for DevTools capture (JS errors, console, network). Requires Firefox + geckodriver ≥ 0.34. Default True. | |
| firefox_binary | No | Optional path to a custom Firefox binary | |
| geckodriver_log | No | Optional file path for geckodriver log |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |