Skip to main content
Glama

Actions before an error

get_user_action_before_error
Read-only

Retrieve the preceding user actions (clicks, typing, navigation) that led to a console error to understand its trigger.

Instructions

Reconstruct what the user did right before a console error: returns the last window user actions (click/type/navigate) preceding the error, to explain how it was triggered. Returns JSON { errorId, errorTs, actions }. Get errorId from get_session_console_errors first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession id from list_recent_sessions.
errorIdYesConsole error id from get_session_console_errors.
windowNoHow many preceding user actions to return (1-50; default 10).
Behavior4/5

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

Annotations declare readOnlyHint=true, which the description does not contradict. Beyond annotations, the description discloses the return format (JSON with errorId, errorTs, actions) and behavioral details: actions are the last N (default 10, max 50) preceding the error and include click/type/navigate. This adds meaningful context.

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 three sentences, front-loaded with core purpose, then details on usage and output format. Every sentence adds information without redundancy. No wasted words.

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?

Despite lacking an output schema, the description explicitly outlines the return JSON structure. It covers inputs (sessionId, errorId, window) and their origins. The tool is straightforward, and the description adequately prepares an agent to use it correctly. Minor omission: no mention of rate limits or potential errors, but readOnlyHint mitigates this.

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 the schema already documents all three parameters. The description adds value by explaining that 'window' refers to the number of preceding user actions to return, and that errorId comes from a specific sibling tool (get_session_console_errors). It also implicitly clarifies sessionId's origin via sibling context.

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 reconstructs user actions (click/type/navigate) right before a console error, specifying the resource and purpose. It distinguishes from siblings like get_session_console_errors (which gets error IDs) and generate_playwright_repro (another reconstruction tool) by focusing on the 'window' of actions preceding the error.

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 explicitly instructs to get errorId from get_session_console_errors first, providing a clear prerequisite. It implies when to use: after obtaining a console error and wanting to understand its trigger. While it doesn't explicitly list alternatives, the context of sibling tools makes it clear when this tool is appropriate.

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/Cubenest/rrweb-stack'

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