Skip to main content
Glama

Read console messages

read_console_messages
Read-only

Read console logs, warnings, errors and uncaught exceptions from a browser tab while connected. Filter messages with a case-insensitive regex pattern or restrict results to errors only.

Instructions

Read console messages (console.log/warn/error, uncaught exceptions) from a tab, captured while connected. Messages from a previous site are dropped when the tab navigates to another origin. Always provide a pattern to filter out noise.

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": {
      "tabId": "<tabId>"
    },
    "name": "read_console_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
clearNoClear the returned messages after reading.
limitNoMaximum messages (default 100, most recent).
tabIdYesTab ID from tabs_context / tabs_create.
patternNoCase-insensitive regex the message must match.
onlyErrorsNoOnly errors and uncaught exceptions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond readOnlyHint=true, the description discloses two non-obvious behaviors: capture is scoped to the connected session and the buffer is discarded on cross-origin navigation, which directly affects whether the agent's earlier actions are still observable. It leaves the return shape (fields per message, ordering) unexplained, though the limit param hints at most-recent ordering.

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

Conciseness5/5

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

Three short sentences ordered by importance: what it reads, lifecycle constraints, then the one usage rule. No filler and no repetition of the schema.

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 5-param read tool with no output schema and full schema coverage, the description covers source, capture window, and invalidation. Only the structure of returned messages is unaddressed, which is a minor gap given the schema documents filtering and pagination-style limits.

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 bar is a baseline 3; the description adds meaning by telling the agent that pattern should always be supplied to cut noise, elevating a documented-but-optional filter into expected practice. Other params (clear, limit, onlyErrors) get no extra narrative beyond their schema text.

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 with an enumeration of exactly what counts as a console message (console.log/warn/error, uncaught exceptions) and the source (a tab). That vocabulary alone separates it from siblings like read_network_requests or read_page without needing to name them.

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 real operating context: messages exist only for the window while connected, and cross-origin navigation wipes the buffer, plus an explicit recommendation to always pass a pattern. It stops short of naming an alternative tool or stating when a different sibling (e.g. javascript_tool) would be better.

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