Skip to main content
Glama

读取页面控制台日志

get_console

Fetch recent browser console logs and uncaught exceptions from a page. Use the since timestamp to fetch only newer entries for incremental monitoring.

Instructions

读取页面最近的 console 输出与未捕获异常(client.js 会自动捕获上报)。limit 为返回条数(默认 50);传 since(毫秒时间戳)则只返回该时间之后的日志(增量拉取),返回末尾会附上最新一条的 ts,可作为下次调用的 since 继续拉取,用于区分修改代码前后的日志。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo返回最近多少条,默认 50
sinceNo只返回该毫秒时间戳之后的日志(增量拉取,配合返回值末尾的 ts 使用)
pageIdNo目标页面 id(单页时可省略)
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. It discloses that client.js automatically captures and reports console output, that `limit` defaults to 50, and that the response includes a trailing `ts` for incremental polling. It does not explicitly declare the operation as read-only, but the verb '读取' and lack of mutation language make that reasonably clear.

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 two efficient sentences. The first states the core purpose, and the second packs parameter behavior, the incremental polling mechanism, and the intended use case without fluff.

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?

The description explains what the tool returns and how to iterate with the trailing timestamp, which is essential since there is no output schema. It does not explicitly cover multi-page behavior for `pageId` or exact response formatting, but the schema covers `pageId` and the sibling `list_pages` provides context.

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 description coverage is 100%, so the baseline is 3. The description adds real value beyond the schema by explaining the cursor protocol: the returned `ts` can be passed as the next `since`, which is more informative than the schema's terse '配合返回值末尾的 ts 使用'.

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 states a specific verb and resource: read recent console output and uncaught exceptions. This resource is unique among the sibling tools, so there is no ambiguity with DOM, navigation, or interaction tools.

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 gives clear usage context: incremental log fetching with a `since` timestamp and using the returned `ts` as the next cursor to distinguish logs before and after code changes. It does not explicitly name alternatives or when-not-to-use conditions, so it falls short of a 5.

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/kirakiray/web-bridge-mcp'

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