Skip to main content
Glama

get_console_logs

Retrieve browser console logs from the Chromium ARM64 server to monitor and debug web automation tasks, ensuring accurate analysis of JavaScript errors and user interactions.

Instructions

Get browser console logs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that returns the stored console logs as a JSON string in the MCP response format.
    async getConsoleLogs() { return { content: [{ type: 'text', text: JSON.stringify(consoleLogs, null, 2) }], }; }
  • index.js:367-368 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes 'get_console_logs' tool calls to the getConsoleLogs method.
    case 'get_console_logs': return await this.getConsoleLogs();
  • Tool registration in ListToolsRequestSchema response, including empty input schema since no parameters are needed.
    name: 'get_console_logs', description: 'Get browser console logs', inputSchema: { type: 'object', properties: {}, }, },
  • Event listener in setupEventListeners that captures and stores console logs from Runtime.consoleAPICalled CDP events into the global consoleLogs array.
    if (message.method === 'Runtime.consoleAPICalled') { const logEntry = { type: message.params.type, text: message.params.args.map(arg => arg.value || arg.description).join(' '), timestamp: new Date().toISOString() }; consoleLogs.push(logEntry); 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(); }
  • Global array that stores console log entries for the get_console_logs tool.
    let consoleLogs = [];

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