Skip to main content
Glama

get_console_errors

Retrieve browser console errors to identify JavaScript issues and debug web applications during automated testing.

Instructions

Get browser console errors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool logic, returning the stored console errors as a JSON string in the MCP response format.
    async getConsoleErrors() {
      return {
        content: [{ type: 'text', text: JSON.stringify(consoleErrors, null, 2) }],
      };
    }
  • index.js:239-246 (registration)
    Registration of the 'get_console_errors' tool in the ListToolsRequestSchema handler, including name, description, and input schema (empty object).
    {
      name: 'get_console_errors',
      description: 'Get browser console errors',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema for the get_console_errors tool (no required properties).
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Dispatch case in the central CallToolRequestSchema switch statement that routes to the getConsoleErrors handler.
    case 'get_console_errors':
      return await this.getConsoleErrors();
  • Helper code in setupEventListeners that populates the global consoleErrors array from Runtime.consoleAPICalled events.
      if (['error', 'warning'].includes(message.params.type)) {
        consoleErrors.push(logEntry);
      }
      
      // Keep only last 100 entries
      if (consoleLogs.length > 100) consoleLogs.shift();
      if (consoleErrors.length > 100) consoleErrors.shift();
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't explain key behaviors: whether it returns real-time or historical errors, if it requires specific browser states, what format the output is in, or if it has side effects like clearing logs. This leaves significant gaps for an agent to understand how to use it effectively.

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 extremely concise—just three words—and front-loaded with the core action. There is no wasted language or unnecessary elaboration, making it easy to parse quickly while still conveying the essential purpose.

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

Completeness2/5

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

Given the tool's complexity (likely moderate, as it interacts with browser state) and the lack of annotations and output schema, the description is insufficient. It doesn't cover what the tool returns, how errors are formatted, or any behavioral nuances, leaving the agent with incomplete information to use the tool correctly in context with its siblings.

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?

The tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to add parameter details, so it meets the baseline for a parameterless tool. No additional semantic information is required or provided.

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 'Get browser console errors' clearly states the verb ('Get') and resource ('browser console errors'), making the tool's purpose immediately understandable. However, it doesn't differentiate from its sibling 'get_console_logs', which likely retrieves general console logs rather than specifically errors, leaving some ambiguity about when to choose one over the other.

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 like 'get_console_logs' or 'get_network_errors'. It lacks context about prerequisites (e.g., needing an active browser session) or typical use cases (e.g., debugging JavaScript issues), leaving the agent to infer usage from the tool name alone.

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/nfodor/claude-arm64-browser'

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