Skip to main content
Glama

getConsoleLogs

Capture and analyze browser console logs to monitor JavaScript errors, debug web applications, and track browser activity through Chrome extension integration.

Instructions

Check our browser logs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function for the 'getConsoleLogs' tool. It uses withServerConnection to fetch console logs from the browser server at /console-logs endpoint, parses the JSON response, and returns it formatted as a text content block.
    server.tool("getConsoleLogs", "Check our browser logs", async () => {
      return await withServerConnection(async () => {
        const response = await fetch(
          `http://${discoveredHost}:${discoveredPort}/console-logs`
        );
        const json = await response.json();
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(json, null, 2),
            },
          ],
        };
      });
    });
  • The registration of the 'getConsoleLogs' MCP tool using server.tool(), including the inline handler.
    server.tool("getConsoleLogs", "Check our browser logs", async () => {
      return await withServerConnection(async () => {
        const response = await fetch(
          `http://${discoveredHost}:${discoveredPort}/console-logs`
        );
        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?

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose whether this is read-only, if it requires specific permissions, how logs are returned (e.g., format, pagination), or any side effects like clearing logs. 'Check' suggests a read operation, but this isn't explicitly confirmed.

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. It's front-loaded with the core action, though it could be more specific (e.g., 'Retrieve all browser console logs'). The brevity is appropriate but borders on under-specification.

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 no annotations, no output schema, and multiple sibling tools, the description is incomplete. It doesn't explain what 'browser logs' include (e.g., console, network, errors), how results are structured, or how this differs from similar tools. For a tool in a set with specialized alternatives, more context is needed to guide proper selection.

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 the schema fully documents the absence of inputs. The description doesn't need to add parameter semantics, and it correctly implies no inputs are required, aligning with the schema. Baseline 4 is appropriate for zero-parameter tools.

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 browser logs' states a clear action ('Check') and resource ('browser logs'), but it's vague about scope and format. It doesn't distinguish from siblings like 'getConsoleErrors' or 'getNetworkLogs' that might retrieve specific log subsets.

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 guidance on when to use this tool versus alternatives like 'getConsoleErrors' or 'getNetworkLogs'. The description implies a general log check but doesn't specify contexts, prerequisites, or exclusions, leaving the agent to guess based on tool names 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/Sugatraj/Cursor-Browser-Tools-MCP'

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