Skip to main content
Glama

getConsoleErrors

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

Instructions

Check our browsers console errors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the getConsoleErrors tool. It connects to the browser server and fetches console errors from the /console-errors endpoint, then formats and returns the JSON response as text content.
    server.tool(
      "getConsoleErrors",
      "Check our browsers console errors",
      async () => {
        return await withServerConnection(async () => {
          const response = await fetch(
            `http://${discoveredHost}:${discoveredPort}/console-errors`
          );
          const json = await response.json();
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(json, null, 2),
              },
            ],
          };
        });
      }
    );
  • Registers the getConsoleErrors tool on the MCP server with description 'Check our browsers console errors'. The handler is inline.
    server.tool(
      "getConsoleErrors",
      "Check our browsers console errors",
      async () => {
        return await withServerConnection(async () => {
          const response = await fetch(
            `http://${discoveredHost}:${discoveredPort}/console-errors`
          );
          const json = await response.json();
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(json, null, 2),
              },
            ],
          };
        });
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Check' which implies a read operation, but doesn't disclose behavioral traits such as whether it returns real-time or historical errors, if it requires specific browser states, or what format the output takes. The description is minimal and lacks critical context for safe invocation.

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 a single, efficient sentence with no wasted words, making it appropriately concise. However, it could be more front-loaded with additional context to improve clarity without sacrificing brevity.

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 (implied by checking browser console errors) and lack of annotations and output schema, the description is incomplete. It doesn't explain what 'Check' entails (e.g., retrieval, analysis), the scope of errors, or the return format, leaving significant gaps for the agent to operate effectively.

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 with 100% schema description coverage, so no parameter documentation is needed. The description doesn't add parameter details beyond the schema, but this is appropriate given the lack of parameters, meeting the baseline for tools with no parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Check our browsers console errors' states a clear verb ('Check') and resource ('browsers console errors'), but it's somewhat vague about scope and doesn't differentiate from sibling tools like getConsoleLogs or getNetworkErrors. It specifies 'console errors' but doesn't clarify if this includes all browsers or just the current session.

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?

No explicit guidance is provided on when to use this tool versus alternatives like getConsoleLogs or getNetworkErrors. The description implies it's for checking console errors, but doesn't specify context, prerequisites, or exclusions, 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/oenius/browser-tools-mcp'

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