Skip to main content
Glama

get_console_logs

Retrieve console logs from a Chrome tab to debug errors, monitor health, and inspect exceptions. Filter by severity and clear after retrieval.

Instructions

Retrieves cached console messages including log, warning, error, info levels and uncaught exceptions. Side effects: when 'clear' is true the cached console messages are emptied after being returned. Prerequisites: requires an active Chrome tab. Returns: JSON array of console messages with timestamp, level, and text. Use this to debug script errors, monitor page health, inspect exception traces. Alternatives: browser DevTools Console, error logging services.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNoClear console cache after returning logs. Constraints: boolean. Interactions: when true, subsequent calls only return new messages. Defaults to: false.
tab_idNoThe Tab ID of the target tab. Omit to use the active tab.
instance_idNoChrome instance id from open_instance/list_instances. Omit for the default instance.
level_filterNoFilter logs by severity level (case-insensitive). Constraints: 'error', 'warning', 'info', 'log', or similar CDP log level. Interactions: when provided, returns only matching level; empty returns all. Defaults to: None (no filtering).
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It openly states the side effect of 'clear' (emptying cache after return), the prerequisite, and the return format. It does not mention potential errors or failure modes, but it sufficiently discloses the critical behaviors an agent needs to know. The absence of annotations makes this transparency valuable.

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?

The description is well-structured and front-loaded with the primary purpose. It flows logically through side effects, prerequisites, returns, usage, and alternatives. Every sentence contributes meaningful information, with no redundancy or fluff. It is concise and scannable.

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?

Given the tool's moderate complexity (4 params, no output schema), the description covers all essential aspects: what it does, side effects, prerequisites, return format, and use cases. An agent can correctly invoke this tool based solely on the description and schema. There are no obvious gaps that would lead to misuse.

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 the baseline is 3. The description adds context about the 'clear' side effect, which clarifies its parameter's behavior, but does not elaborate on other parameters (tab_id, instance_id, level_filter) beyond what the schema already states. The added value is marginal, so 3 is appropriate.

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?

The description clearly states the verb 'Retrieves' and the resource 'cached console messages', list specific log levels and exceptions. It distinguishes itself from sibling tools like get_network_logs by specifying console messages. The usage context ('debug script errors, monitor page health') further clarifies its purpose.

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?

The description provides clear prerequisites ('requires an active Chrome tab') and explicit use cases, but does not explicitly state when not to use it or directly compare to sibling tools. It mentions external alternatives (DevTools Console, error logging services) but excludes no sibling tools, leaving some ambiguity about when to prefer this over get_network_logs or similar. However, the context is still clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raultov/chrome-debug-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server