Skip to main content
Glama
xav-ie

Browser Session MCP

list_console_messages

Read-only

Retrieve console logs, warnings, errors, and uncaught exceptions from a browser session's pages to debug page errors; read-only and optionally filtered by visit.

Instructions

List console messages (console.log, warnings, errors, uncaught exceptions) the session's pages emitted, oldest first, from the most recent limit. Use it to debug page errors; use list_network_requests for failed requests. Pass visit (a seq from list_visits) to see one page load; without it, messages from every visit are merged and limit keeps the newest. It reads logs and changes nothing. Empty unless the listener role is running, nothing is captured while stealth is on, and logs are deleted when the session closes.

Input Schema

NameRequiredDescriptionDefault
limitNoReturn at most this many of the newest messages. Default 500.
visitNoOnly messages from this visit, by its `seq` from list_visits. Default: all visits.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.

Output Schema

NameRequiredDescriptionDefault
messagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.5
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ConsoleEntry": {
      +      "properties": {
      +        "t": {
      +          "type": "string"
      +        },
      +        "text": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "t",
      +        "type",
      +        "text"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "properties": {
      +    "messages": {
      +      "items": {
      +        "$ref": "#/$defs/ConsoleEntry"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "messages"
      +  ],
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / limit / description
      Added value: +"Return at most this many of the newest messages. Default 500."
    • addedInput schema / properties / sessionId / description
      Added value: +"The id returned by open_browser_session. Errors if no open session has it."
    • addedInput schema / properties / visit / description
      Added value: +"Only messages from this visit, by its `seq` from list_visits. Default: all visits."
  3. First observedv0.1.2

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation by disclosing non-obvious preconditions and lifecycle behavior: results are empty unless the listener role is running, nothing is captured while stealth is on, and logs are deleted when the session closes. The merge/limit interaction ('limit keeps the newest') is also behavior an agent could easily get wrong.

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 the purpose, then the alternative, then parameter behavior, then preconditions — a sensible ordering. It is dense and the phrase 'oldest first, from the most recent `limit`' takes a beat to parse, but no sentence is filler.

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

Completeness5/5

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

With an output schema handling return values and annotations covering safety, the description fills exactly the remaining gaps: prerequisites (listener role), known blind spot (stealth), data lifecycle (deleted on close), and scoping. Nothing an agent needs to call this correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema lacks: without `visit` the messages from every visit are merged and `limit` applies to the newest, and `visit` is sourced from list_visits' `seq`. This is a genuine increment, though it stops short of giving limits or a default reminder.

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 ('List console messages') and enumerates exactly which message kinds are included (console.log, warnings, errors, uncaught exceptions). It also explicitly separates itself from list_network_requests, so an agent can distinguish it from the nearest sibling 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 Guidelines5/5

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

Gives an explicit use case ('Use it to debug page errors') and names the alternative with its own condition ('use list_network_requests for failed requests'). It also explains the visit-vs-no-visit choice, so both usage decisions are resolved in the text.

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