Skip to main content
Glama

Console logs

console_logs
Read-only

Reads a tab's console messages, uncaught exceptions, promise rejections, and browser warnings from pages, iframes, and workers, with filters for level, time, pattern, and stack traces.

Instructions

Reads the tab's console like the DevTools Console panel: console.* calls, uncaught exceptions and promise rejections (with stack traces), and browser-side messages (network errors, violations, deprecations) — from the page and its iframes/workers. Messages logged before the agent started watching are included as far as Chrome kept them.

Input Schema

NameRequiredDescriptionDefault
clearNoClear the buffer after reading.
limitNoReturn at most this many of the newest matching messages (default 100).
sinceNoOnly messages after this time (ms since epoch).
stackNoInclude stack traces (default: only for errors).
tabIdNoTab to act on. Defaults to the session target tab (see tab_select).
levelsNoOnly these levels (default all).
patternNoOnly messages matching this regular expression (case-insensitive).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), and the description still adds real behavioral context: stack traces are attached to errors by default, output spans iframes and workers, and the buffer is retroactive ("as far as Chrome kept them"), which warns the agent that history is best-effort and bounded. It stops short of saying whether clearing happens by default or how the retention window behaves.

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?

Two sentences, front-loaded with the analogy that anchors the whole mental model, followed by the retention caveat. The em-dash enumeration is dense but every clause carries distinct information; there is no filler.

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 seven-parameter read tool with no output schema, the description does enough: it says what kinds of records come back, that stacks accompany errors, and that scope extends to frames and workers. Remaining gaps are minor — ordering of results, default tab resolution, and truncation semantics — and are largely covered by the 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 all seven parameters (clear, limit, since, stack, tabId, levels, pattern) are already documented in the schema. The description only lightly echoes two of them (stack traces for errors, retained history implied by `since`) and adds no format or interaction detail such as how clear combines with limit.

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?

Specific verb and resource ("Reads the tab's console") with an explicit enumeration of what is captured: console.* calls, uncaught exceptions, promise rejections with stacks, and browser-side messages, scoped to page, iframes and workers. It is very clear what the tool returns, but it never names or contrasts a sibling — notably devtools_issues, which also surfaces violations/deprecations, and network_har/network_requests for network errors — so an agent must infer the boundary itself.

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?

Usage is implied by the framing "like the DevTools Console panel" and by the breadth of captured message types, but there is no explicit when-to-use, when-not-to-use, or alternative routing. Nothing tells the agent whether to prefer this over devtools_issues for grouped browser issues or over evaluate for ad-hoc diagnostics.

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