Skip to main content
Glama

get_console_logs

Retrieve console messages from Chrome DevTools to debug script errors, monitor page health, and inspect exception traces. Filter by severity level and optionally clear cache.

Instructions

Retrieves cached console messages including log, warning, error, info levels and uncaught exceptions. Side effects: optionally clears cache when 'clear' is true. 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
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).
clearNoClear console cache after returning logs. Constraints: boolean. Interactions: when true, subsequent calls only return new messages. Defaults to: false.
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 effectively describes side effects ('optionally clears cache when 'clear' is true'), prerequisites, and return format ('JSON array of console messages with timestamp, level, and text'). However, it lacks details on rate limits, error handling, or pagination, which could be relevant for a logging tool.

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 front-loaded with core functionality and efficiently structured into distinct sections (side effects, prerequisites, returns, usage, alternatives). Each sentence adds value without redundancy, making it highly concise and well-organized for quick comprehension.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is largely complete, covering purpose, usage, behavior, and return format. However, it could benefit from more details on error scenarios or performance implications, slightly reducing completeness.

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%, providing detailed constraints and interactions for both parameters. The description adds minimal value beyond the schema, only mentioning the 'clear' parameter's effect on cache. It does not explain the 'level_filter' parameter or provide additional context, so the baseline score of 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 specific action ('Retrieves cached console messages') and resource ('console messages including log, warning, error, info levels and uncaught exceptions'), distinguishing it from sibling tools like get_network_logs or get_custom_events. It explicitly mentions the types of messages retrieved, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('Use this to debug script errors, monitor page health, inspect exception traces') and names alternatives ('browser DevTools Console, error logging services'). It also includes prerequisites ('requires an active Chrome tab'), offering comprehensive usage context.

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