bwb-browser
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BWB_CDP_PORT | No | Remote debugging port (0 for random free port) | 0 |
| BWB_HEADLESS | No | Run headless (true/false) | true |
| BWB_CHROME_PATH | No | Path to Chrome/Chromium binary | auto-detected |
| BWB_NAV_TIMEOUT | No | Navigation timeout in ms | 30000 |
| BWB_USER_DATA_DIR | No | Browser profile directory | ~/.cache/bwb-browser |
| BWB_SCREENSHOTS_DIR | No | Screenshot save location | ~/bwb-screenshots/ |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| browser_gotoA | Open a URL. |
| browser_screenshotB | Take a screenshot of the current page. Pass a CSS selector to capture just that element. |
| browser_htmlA | Return the page HTML (or the outerHTML of the first element matching a CSS selector). Capped at |
| browser_textA | Return the visible text ( |
| browser_backA | Go back in browser history (like clicking the browser back button). |
| browser_clickA | Click an element. Prefer |
| browser_fillA | Clear a field and replace its content. Prefer |
| browser_snapshotA | Accessibility tree of the page as indented text, with |
| browser_hoverA | Move the real pointer onto a ref from browser_snapshot — CSS :hover, dropdown menus and tooltips behave because it is a real mouse move, not a synthetic event. Returns where the pointer landed. |
| browser_selectA | Choose an option in a native by value, exact visible label, or index. Fires input and change, so frameworks notice. For a custom dropdown (button + list) use browser_click twice instead — the error says so if you try. |
| browser_pressA | Press a key or a chord at whatever has focus: "Enter", "Tab", "Escape", "ArrowDown", "Control+a", "Meta+Shift+k". Modifiers go down first and up last, so the page sees one chord and not three unrelated keydowns. Focus a field with browser_click or browser_fill first. |
| browser_scrollA | Scroll with real wheel events (lazy loading and scroll-linked animation behave), or scroll an element into view by ref, or jump to top/bottom. Returns the resulting scroll position. |
| browser_dragA | Drag one element onto another (refs from browser_snapshot) with real mouse motion — the intermediate moves are what make HTML5 drag-and-drop and pointer-event libraries believe the drag started. |
| browser_consoleA | Console output, uncaught exceptions and browser log entries from this page — always recording, so nobody has to remember to start it. Includes what happened during navigation, which is where the real errors are. |
| browser_networkA | Requests the page made (method, URL, type, status, size, duration, failure) — always recording, requests only, never bodies. Filter to failures or HTTP errors to find what broke. |
| browser_waitForA | Wait for exactly one condition, then return: text to appear (or disappear), a ref to become visible (or vanish), a selector, a URL (with * wildcards), or the network to go idle. Use this instead of sleep-and-hope. On timeout the error says what was last seen and suggests a fresh snapshot. |
| browser_dialogA | alert/confirm/prompt block the page until answered. |
| browser_storageA | localStorage, sessionStorage or cookies for this page. Reads return names, sizes and flags — never values, because a value is usually a token and a token in context is a leak. Use action "get-value" for one key when you genuinely need its content, and "set"/"remove"/"clear" to change state. |
| browser_framesA | Every frame on the page, flattened, with ids and URLs. Use a frame id with browser_snapshot to read inside an iframe instead of guessing its contents from the parent. |
| browser_extractA | Pull a page's structures out whole: links (text+href), tables (headers+rows), forms (fields, types, labels, required), or structured data (title, meta, JSON-LD, headings). Cheaper and more correct than scraping browser_text. |
| browser_uploadA | Put files into a file input without opening the OS picker (which a headless or phone browser cannot answer). Absolute paths on this machine; the input must be . Returns the file names and how many the input accepted. |
| browser_elementsB | List interactive elements by kind: links, buttons, inputs, headings. |
| browser_evalA | Run a JavaScript expression in the active page and return its JSON-serializable result. Promises are awaited ( |
| browser_setViewportA | Change the viewport size (width × height) for responsive testing. Defaults to 1280×720. Pass |
| browser_actA | Perform one simple action on the current page from a plain-English instruction: |
| browser_watchA | Record page events from the active tab. |
| browser_diagnoseA | Page health check for the active page: load timings, console errors, broken images, meta tags, interaction counts, and a heuristic score (0-100, weighted penalty sum — not a Lighthouse audit). Safe to call while browser_watch is recording. |
| browser_fingerprintA | Apply common anti-detection patches (hide the webdriver flag, plausible plugins/languages, a user agent derived from the real Chromium build) to pages loaded afterwards. Intended for testing sites you own or have permission to test. Call before browser_goto. |
| browser_waitForSelectorA | Wait for a CSS selector to appear (visible) or disappear from the DOM. Polls every 200ms until found or timeout. |
| browser_newTabA | Create a new browser tab, optionally navigate to a URL. Automatically switches to the new tab. |
| browser_closeTabA | Close a browser tab by targetId. If no targetId provided, closes the active tab. Cannot close the last remaining tab — use browser_restart instead. |
| browser_switchTabA | Switch to a different browser tab by targetId. |
| browser_listTabsA | List all open browser tabs with their IDs, titles, URLs, and active status. In Drishti mode the app owns the tabs, so they come back with owned:false — readable, not yours to navigate or close. |
| browser_saveCookiesA | Save cookies for this browser profile as a JSON file in ~/.bwb/sessions (permissions 600). The file contains live login credentials: treat it like a password. Pass |
| browser_loadCookiesA | Load a saved session (cookies) from disk. Only http(s) pages requested after this call will use them — static fetches are skipped for the rest of the run, so a logged-in page is never answered anonymously. |
| browser_listSessionsA | List all saved browser sessions with cookie counts and save dates. |
| browser_downloadA | Download media from a URL (video, audio, subtitles, thumbnail). Requires yt-dlp on the system — if missing, returns install instructions and downloads nothing. http(s) only; the URL is passed to yt-dlp as an argument, never through a shell. |
| browser_exportA | Write text to a file inside the bwb export directory (default ~/bwb-exports). Formats: md, txt, html. Paths outside the export directory are refused. No pdf/docx/pptx: those were reported as "ready" while writing nothing. |
| needs_humanA | Hand the phone to the human, then wait. Use this for logins, captchas, 2FA, payments, or anything that must not be automated — never try to bypass them yourself. Posts the reason to the drishti app and long-polls until the human taps Hand back. Returns {status:"user_done"} or {status:"timed_out"}; outside drishti mode it returns {status:"not_drishti"} and changes nothing. |
| browser_statusA | Get browser and page status including opened tabs and connection info. v4: includes live resource readings (MCP + Chromium MB, budgets) so the agent sees pressure before Android does. |
| browser_restartA | Cleanly restart the browser process, then resume the page you were on. Use it to free memory, clear state, or recover from a wedged session. Cookies in the profile survive; in-page state does not. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 41 tools
Most tools target distinct actions, but several clusters overlap: browser_waitFor subsumes browser_waitForSelector, browser_act re-implements click/fill/goto/text, browser_snapshot vs browser_elements both enumerate interactive nodes, and browser_console/browser_network/browser_watch/browser_diagnose all observe the same page signals. The descriptions do explicitly differentiate them (e.g. waitFor's 'exactly one condition', browser_act's 'for anything precise use browser_click'), which keeps confusion manageable rather than fatal.
Nearly all tools use a stable browser_ + verb/noun camelCase pattern (browser_loadCookies, browser_setViewport, browser_listTabs, browser_switchTab). Deviations are minor: needs_human breaks the prefix entirely, and browser_waitFor vs browser_waitForSelector differ in granularity, but the convention remains predictable.
41 tools is heavy for a browser server, and several are genuinely redundant (waitForSelector, act, diagnose, fingerprint, status vs listTabs). While breadth is defensible for full browser automation, the surface has grown past what an agent can hold in view without misselection.
Coverage is strong across the lifecycle: navigation/history, interaction (click, fill, press, hover, drag, scroll, upload, select), extraction (text, html, elements, snapshot, extract, eval), observability (console, network, watch, diagnose), session/cookie persistence, tab management, downloads/exports, and human handoff. Remaining gaps are minor — no direct attribute/DOM query short of browser_eval, and deliberately no pdf/docx export.