Skip to main content
Glama

browser_console

View browser console logs filtered by level, limit, time range, or URL. Captures console methods, unhandled exceptions, and promise rejections.

Instructions

查看浏览器控制台日志,支持按类型过滤(level: log/warning/error/debug/info)。

覆盖范围:所有 console.error/warn/log/debug、window.onerror 同步异常、unhandledrejection 未处理 Promise 拒绝。

边界说明:

  • 跨域脚本(Script error.):当 标签指向第三方域名且缺少 crossorigin="anonymous" 属性时,只能显示 'Script error.' 而无法获取详情。已自动检测并标记 crossOrigin:true。

  • 极端早期错误:在 addInitScript 执行前发生的 inline 内联同步错误可能遗漏。CDP 层 page.on('console') 可捕获大部分,但 document.write() 中的错误可能被页面渲染流程吞没。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNo控制台日志级别过滤,默认为all
limitNo返回日志数量限制,默认50
sinceNo时间过滤起始点,ISO时间戳或时间描述(如'5m'表示最近5分钟)
urlContainsNo按URL关键字过滤
Behavior5/5

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

Given the absence of annotations, the description thoroughly discloses behavioral traits: what it covers (all console types, window.onerror, unhandledrejection), and critical limitations (cross-origin scripts marked, early inline errors possibly missed, document.write() issues). This provides excellent transparency for an agent.

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 well-structured with primary purpose, coverage, and boundaries in separate sections. It is informative but somewhat lengthy; a minor simplification could improve conciseness without losing key details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers parameters and behavioral limitations well, but it does not describe the output format or structure of the returned logs. Since there is no output schema, the description should hint at the return type or content to be fully complete.

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?

All 4 parameters (level, limit, since, urlContains) are fully described in the input schema (100% coverage). The description only mentions level filtering and URL filtering briefly, adding no new semantic information beyond what the schema provides, hence baseline 3.

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?

The description clearly states the tool reads browser console logs with level filtering, and specifies coverage (console.error/warn/log/debug, window.onerror, unhandledrejection). However, it does not explicitly differentiate from sibling tools like browser_errors, leaving some ambiguity about when to use which.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as browser_errors or browser_network. It only describes its own functionality and limitations, without any comparative or conditional usage advice.

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/validpilot/ai-verify-mcp'

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