Skip to main content
Glama

get_console_logs

Retrieves a browser tab's console messages and uncaught exceptions, oldest first, with optional level filtering, limits, and clearing to debug page errors.

Instructions

Lists the tab's console messages and uncaught exceptions, oldest first, one line each: [level] text @ url:line (lines from 1; objects previewed, repeats folded, stacks indented); on Chrome an uncaught error's cause chain follows it (Caused by: lines); include_details gives {messages, total, truncated, notes?} as JSON. Keeps the last 1000 (10000 characters each); cleared when the tab moves to another site. For problems the browser diagnosed (blocked cookies, CORS, CSP) use get_issues.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_console_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
clearNoRemove the returned messages. Default: false.
limitNoMost recent messages to return, 1 to 1000. Default: 200.
tab_idNoDefault: the active tab.
instance_idNoDefault: 'default'.
level_filterNo'error', 'warning', 'info', 'log', 'debug'... Default: every level.
include_detailsNoEvery field (source, timestamp...) as JSON. Default: false (one line each).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-rc.1

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full behavioral burden and does so: output ordering, line format, line numbering from 1, object previewing, repeat folding, stack indentation, Chrome cause-chain lines, and the {messages, total, truncated, notes?} shape for include_details. It also discloses retention limits (last 1000, 10000 chars each), the clearing condition (tab moves to another site), and that clear removes the returned messages.

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 and alternative in the first clause, with no filler sentences. The parenthetical style is dense and slightly hard to parse on first read, but nearly every clause carries operational information.

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 no output schema, the description correctly supplies the return format, and it covers retention, clearing, and ordering for a 6-parameter tool with zero required params. Minor gaps remain, such as whether limit interacts with truncation or whether messages survive reloads versus cross-site navigation.

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 meaning the schema lacks: what include_details actually returns, that clear removes the messages that were just returned, and the retention window that gives limit its context. The interaction between limit and total/truncated is left implicit.

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?

Opens with a specific verb+resource+scope: "Lists the tab's console messages and uncaught exceptions, oldest first, one line each." It then explicitly separates itself from get_issues ("For problems the browser diagnosed (blocked cookies, CORS, CSP) use get_issues"), so an agent can route without opening either 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?

Provides an explicit exclusion plus named alternative for browser-diagnosed problems, which is the highest-risk confusion among the log siblings. It stops short of stating positively when to prefer this over get_network_logs, but the "console messages and uncaught exceptions" scope makes the split inferable.

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