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), }, ], }; }); });

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