Skip to main content
Glama

OpenFactory

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

NameRequiredDescriptionDefault
api_keyNoMCP API key
vm_nameYesYour tester/desktop VM name (starts with 'of-tester-' or 'of-desktop-')
tab_filterNoOptional URL prefix to pick which browser tab to query.
include_perfNoInclude per-stage timing metrics in the response.
session_tokenNoSession token
collect_duration_msNoIf > 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].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden well: it discloses the CDP transport requirement, the two operating modes (snapshot vs. live-collect), what each captures, and the clamping bound. It omits auth/permission expectations for api_key and session_token and any failure behavior when the page hook is absent, keeping it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short paragraphs, each doing distinct work: what it does, transport/mode constraints, then the recommended call pattern. The mode explanation is slightly long, but nothing is redundant enough to cut.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter diagnostic tool with no annotations and no output schema, the description adequately explains both return shapes (snapshot fields vs. live-collected events). It leaves open what happens on the Firefox path or when window.__ofErrors is unpopulated, which are minor but real gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains every parameter, including tab_filter and include_perf. The description adds useful mode semantics for collect_duration_ms but says nothing about include_perf or tab_filter beyond what the schema states, matching the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Capture browser diagnostics') plus the exact payload (console errors, failed requests, page health). The parenthetical about CDP on Brave/Chromium VMs only further scopes what the tool does and what it cannot do, so an agent can identify it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete when-to-use pattern: 'call right after a state transition with collect_duration_ms=2000 to capture errors triggered by the page settling.' It also excludes Firefox environments. It does not name an alternative sibling tool for non-error browser inspection, so it falls short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.