Skip to main content
Glama

page_errors

Read uncaught JavaScript exceptions and stack traces captured at the browser protocol level, enabling quick diagnosis and resolution of page runtime errors.

Instructions

DEBUG CORTEX: read the page's UNCAUGHT JS EXCEPTIONS with stack traces, captured at the protocol level. The error console a developer opens in DevTools — as a tool. Returns JSON [{text, url, line, stack: [frames], ts}]. Auto-starts capture on first call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNoDrain the buffer after reading (default: keep entries).
page_idYes
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.3

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden. It discloses non-obvious behaviors: auto-starting capture on first call, protocol-level capture, and the exact JSON return shape with stack trace frames. It does not discuss buffer retention or permission requirements, but the most important behavioral traits are covered.

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?

Three short sentences, with the core purpose front-loaded in the first sentence. The 'DEBUG CORTEX:' prefix is minor noise, but each subsequent sentence adds distinct useful information: output format and capture timing. Efficient and well-structured.

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?

For a diagnostic read tool with no output schema, the description fully explains the return value shape, the scope (uncaught JS exceptions), and the critical timing nuance (auto-start capture). The schema covers the 'clear' parameter's behavior. Nothing essential is missing for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33%, and the tool description adds no parameter-specific meaning. session_id and page_id are left to inference from their names, and the 'clear' behavior is documented in the schema but not in the description. The description fails to compensate for the low schema coverage.

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?

States a specific verb ('read'), a specific resource ('the page's UNCAUGHT JS EXCEPTIONS'), and the capture mechanism (protocol level, stack traces). The DevTools error-console analogy clearly distinguishes it from sibling tools like page_console and page_network. No ambiguity about what the tool does.

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 'DEBUG CORTEX' framing and the explicit reference to the DevTools error console imply this is the tool for JavaScript exceptions rather than console logs or network activity. It provides clear context for when to use it, though it stops short of explicitly naming alternatives or stating exclusions.

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