get_browser_diagnostics
Capture browser diagnostics — console errors, failed requests, page health.
Uses Chromium DevTools Protocol — Brave/Chromium tester VMs only (Firefox does not expose CDP at :9222). Snapshot mode (collect_duration_ms=0) returns the current page's URL, title, viewport metrics, performance timing, document size, ready state, and the contents of window.__ofErrors if a page hook has populated it. Live-collect mode keeps the CDP session open and captures Log entries (>= warning), console.error/warn calls, uncaught exceptions, network loading failures, and 4xx/5xx responses that fire during the window.
Typical use from a walker: call right after a state transition with collect_duration_ms=2000 to capture errors triggered by the page settling.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"vm_name": "<vm_name>"
},
"name": "get_browser_diagnostics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | MCP API key | |
| vm_name | Yes | Your tester/desktop VM name (starts with 'of-tester-' or 'of-desktop-') | |
| tab_filter | No | Optional URL prefix to pick which browser tab to query. | |
| include_perf | No | Include per-stage timing metrics in the response. | |
| session_token | No | Session token | |
| collect_duration_ms | No | If > 0, keep the DevTools session open for this many ms collecting console errors, exceptions, and failed network requests. 0 = snapshot only (no live collection). Clamped to [0, 10000]. |