Skip to main content
Glama

read_console_messages

Retrieve browser console messages from a specific tab, filter with a regex pattern, and debug JavaScript errors or review application logs without noise.

Instructions

Read browser console messages (console.log, console.error, console.warn, etc.) from a specific tab. Useful for debugging JavaScript errors, viewing application logs, or understanding what's happening in the browser console. Returns console messages from the current domain only. If you don't have a valid tab ID, use tabs_context first to get available tabs. IMPORTANT: Always provide a pattern to filter messages - without a pattern, you may get too many irrelevant messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNoIf true, clear the console messages after reading to avoid duplicates on subsequent calls. Default is false.
limitNoMaximum number of messages to return. Defaults to 100. Increase only if you need more results.
tabIdYesTab ID to read console messages from. Must be a tab in the current group. Use tabs_context first if you don't have a valid tab ID.
patternNoRegex pattern to filter console messages. Only messages matching this pattern will be returned (e.g., 'error|warning' to find errors and warnings, 'MyApp' to filter app-specific logs). You should always provide a pattern to avoid getting too many irrelevant messages.
onlyErrorsNoIf true, only return error and exception messages. Default is false (return all message types).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
provenanceNo
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It discloses that results are limited to the current domain and warns about retrieving too many irrelevant messages without a pattern. These are meaningful behavioral traits beyond what the schema offers, though it doesn't discuss side effects of the 'clear' parameter (but that is covered in the schema).

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?

The description is front-loaded with the core action, then adds use cases, a domain limitation, and a clear IMPORTANT note. It is concise with no redundant phrases, though the use case sentence could be seen as extra but is helpful rather than 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?

Given the tool has 5 parameters and an output schema, the description covers the essential context: what it does, when to use it, and critical constraints (domain filter, pattern requirement). The output schema handles return details, so the description is sufficiently complete for effective tool selection and invocation.

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 baseline is 3, but the description enriches parameter understanding by emphasizing 'Always provide a pattern' and advising to use tabs_context for tabId. This adds practical usage context not explicitly in the schema descriptions.

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 tool's function with a specific verb 'Read' and resource 'browser console messages', including examples of message types. It distinguishes itself from related tools like read_network_requests by focusing on console messages and specifying it reads from a specific tab.

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 clear use cases (debugging JavaScript errors, viewing logs) and prerequisite guidance ('use tabs_context first to get available tabs'). It also gives a strong recommendation to always provide a pattern, which helps avoid overwhelming results. No explicit exclusions, but contextual guidance is solid.

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/sylin-org/ghostlight'

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