get_console_errors
Retrieve browser console errors for debugging and analysis on ARM64 devices using Chromium, enabling efficient web testing and automation workflows.
Instructions
Get browser console errors
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:783-787 (handler)The main handler function for the 'get_console_errors' tool. It returns the contents of the global consoleErrors array as a JSON string in the MCP response format.async getConsoleErrors() { return { content: [{ type: 'text', text: JSON.stringify(consoleErrors, null, 2) }], }; }
- index.js:369-370 (registration)Registration/dispatch in the CallToolRequestSchema switch statement that invokes the getConsoleErrors handler.case 'get_console_errors': return await this.getConsoleErrors();
- index.js:240-246 (schema)Tool schema and metadata definition in the ListToolsRequestSchema response, including name, description, and empty input schema.name: 'get_console_errors', description: 'Get browser console errors', inputSchema: { type: 'object', properties: {}, }, },
- index.js:21-21 (helper)Global array that stores console error log entries collected from CDP Runtime.consoleAPICalled events.let consoleErrors = [];
- index.js:521-523 (helper)Code in setupEventListeners that populates the consoleErrors array when error or warning console events are received via CDP.if (['error', 'warning'].includes(message.params.type)) { consoleErrors.push(logEntry); }