Skip to main content
Glama
chrome-dev-mcp

chrome-dev-mcp

get_console_logs

Read-only

Retrieve browser console messages and uncaught exceptions, including DevTools history and stack traces, to diagnose page errors and check whether changes introduced new issues.

Instructions

Return browser console messages and uncaught exceptions, including the history already visible in DevTools before this server connected. Exceptions are reported with their full stack trace (source-mapped when available). Reloading or navigating the page does NOT clear this buffer: output from the old document stays and the new one is appended to it, so an entry carries from when it predates the document showing now. Replayed entries carry no timestamp — Chrome hands its backlog over without one.

Input Schema

NameRequiredDescriptionDefault
levelNoFilter by log level / type. Omit to return all levels.
limitNoMaximum number of most-recent entries to return
sinceNoHow far back to read: a lower bound rather than a label to match, since each value INCLUDES the newer ones. `current-page-load` is only the document showing now, which answers "did my change introduce a new error" — reload, ask for it, and an empty result is a real answer. `earlier-page-load` adds the pages this connection watched come and go; `before-connect` (the default) adds the backlog that was already in DevTools before it attached.before-connect

Output Schema

NameRequiredDescriptionDefault
logsYesOldest first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.0.0
    • addedInput schema / properties / since
      Added value: +{
      +  "default": "before-connect",
      +  "description": "How far back to read: a lower bound rather than a label to match, since each value INCLUDES the newer ones. `current-page-load` is only the document showing now, which answers \"did my change introduce a new error\" — reload, ask for it, and an empty result is a real answer. `earlier-page-load` adds the pages this connection watched come and go; `before-connect` (the default) adds the backlog that was already in DevTools before it attached.",
      +  "enum": [
      +    "before-connect",
      +    "earlier-page-load",
      +    "current-page-load"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / logs / description
      Added value: +"Oldest first."
    • addedOutput schema / properties / logs / items / properties / from
      Added value: +{
      +  "enum": [
      +    "before-connect",
      +    "earlier-page-load"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / logs / items / properties / timestamp / description
      Added value: +"When this server received the entry. Absent on `before-connect` entries."
    • changedOutput schema / properties / logs / items / required
      Previous value: -[
      -  "timestamp",
      -  "type",
      -  "text"
      -]New value: +[
      +  "type",
      +  "text"
      +]
  2. Changed1 schema field changedv1.4.0
    • removedInput schema / properties / clear
      Removed value: -{
      -  "default": false,
      -  "description": "Clear the buffer after returning entries",
      -  "type": "boolean"
      -}
  3. Changed1 schema field changedv1.3.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "logs": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "stackTrace": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "columnNumber": {
      +                  "type": "number"
      +                },
      +                "functionName": {
      +                  "type": "string"
      +                },
      +                "lineNumber": {
      +                  "type": "number"
      +                },
      +                "url": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "functionName",
      +                "url",
      +                "lineNumber",
      +                "columnNumber"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "text": {
      +            "type": "string"
      +          },
      +          "timestamp": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "timestamp",
      +          "type",
      +          "text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "logs"
      +  ],
      +  "type": "object"
      +}
  4. First observedv1.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already establish readOnlyHint=true, so the safety bar is lower, yet the description adds substantial behavior beyond it: source-mapped stack traces, a buffer that survives reloads/navigation with old entries preserved, an entry-level `from` marker for pre-document output, and the caveat that replayed entries carry no `timestamp` because Chrome supplies none. These are exactly the quirks an agent would otherwise misread as bugs.

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 core purpose, then the buffer caveat, then the timestamp caveat — a sensible ordering with no filler. Slightly redundant with the existing output schema in its closing notes on `from` and `timestamp`, though those notes carry semantic value the schema alone may not convey.

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?

For a three-parameter read tool with an output schema and readOnly annotations, this covers everything an agent needs: what is returned, that stack traces may be source-mapped, that the buffer is cumulative across navigations, and how to interpret entries that predate the current document. Nothing material is missing.

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%, including a detailed `since` enum doc that already explains the layered lower-bound semantics, so the baseline is 3. The description reinforces the pre-connect backlog concept but adds no parameter-level detail (no format, no interaction with `limit`/`level`) beyond what the schema already spells out.

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?

Specific verb ('Return') plus concrete resource ('browser console messages and uncaught exceptions'), with an explicit scope qualifier: it includes DevTools history that predates the server connection. That scope statement alone separates it from every sibling in the list, since no other tool surfaces console output or exceptions.

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

Usage Guidelines3/5

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

The description explains the semantics of the buffer thoroughly, but never states when to reach for this tool versus alternatives (e.g. get_debugger_state, evaluate_js, get_network_requests) or what a good reason to call it is. Guidance is implied by the note about navigating not clearing the buffer, but no explicit when-to-use or when-not-to-use is given.

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