Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

get_console_logs

Retrieve browser console logs for debugging web applications on ARM64 devices. Streamlines web testing and automation by capturing critical log data directly from the Chromium browser.

Instructions

Get browser console logs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_console_logs' tool. It returns the globally stored console logs as a JSON-formatted text content.
    async getConsoleLogs() { return { content: [{ type: 'text', text: JSON.stringify(consoleLogs, null, 2) }], }; }
  • index.js:231-238 (registration)
    Tool registration in the ListTools response, including name, description, and empty input schema.
    { name: 'get_console_logs', description: 'Get browser console logs', inputSchema: { type: 'object', properties: {}, }, },
  • Dispatcher case in the CallToolRequestSchema handler that invokes the getConsoleLogs method.
    case 'get_console_logs': return await this.getConsoleLogs();
  • Helper code in setupEventListeners that collects console logs from CDP Runtime.consoleAPICalled 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 the console log entries used by the get_console_logs handler.
    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/mcp-chromium-arm64'

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