Skip to main content
Glama

diagnostics

Retrieve console messages and network request data from a browser session to debug JavaScript errors and failed network requests.

Instructions

Get diagnostic information from the browser session. Useful for debugging JavaScript errors, failed network requests, etc.

Available types:

  • "console": Recent console messages (log, warn, error, etc.)

  • "network": Recent network requests with status codes and timing

  • "all": Both console and network data

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": {
      "session": "<session>"
    },
    "name": "diagnostics"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoType of diagnostics to retrieve. Default: all
clearNoClear the buffers after reading. Default: false
levelNoFilter console entries by level (only for type: console or all)
limitNoMaximum number of entries to return per type. Default: 50
sessionYesThe session name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully tells the agent that console entries include log/warn/error levels and that network entries carry status codes and timing, but it says nothing about buffer retention windows, whether capture must already be enabled, or what reading does to the buffers (the clear side effect is only documented in the schema).

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?

Front-loaded with purpose in the first sentence, then a compact bullet list of types. The bullets largely duplicate the schema enum, which is minor waste, but nothing else is extraneous.

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?

With five parameters, one required and two enums, plus no output schema, the definition does enough for an agent to call it correctly on a first attempt: it names the discriminators and states what each returns at a high level. The remaining gap is the absence of any return-shape description, which matters more given there is no output schema.

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 every parameter including type, clear, level, and limit is already documented in the schema. The description's type bullets mostly restate the enum, adding only that entries are 'recent'; baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb+resource (get diagnostic information from the browser session) and immediately scopes it to debugging JavaScript errors and failed network requests, which separates it from siblings like screenshot, elements, and query. It doesn't explicitly name a sibling, so it stops short of a 5.

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 clear when-to-use context ('debugging JavaScript errors, failed network requests') and the type list implicitly guides selection among console/network/all. There are no explicit exclusions or named alternatives (e.g. when to prefer query or overview instead), so it is context-setting rather than full routing.

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