getConsoleErrors
Identify and monitor console errors in web browsers to debug issues and improve website performance. Integrates with Chrome for real-time error tracking.
Instructions
Check our browsers console errors
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- browser-tools-mcp/mcp-server.ts:195-214 (registration)Registers the MCP tool 'getConsoleErrors' with an inline anonymous handler function. The handler uses 'withServerConnection' to ensure connection to the browser connector server, then fetches console errors from the '/console-errors' endpoint and returns the JSON-formatted response as text content.server.tool( "getConsoleErrors", "Check our browsers console errors", async () => { return await withServerConnection(async () => { const response = await fetch( `http://${discoveredHost}:${discoveredPort}/console-errors` ); const json = await response.json(); return { content: [ { type: "text", text: JSON.stringify(json, null, 2), }, ], }; }); } );
- browser-tools-mcp/mcp-server.ts:198-213 (handler)The inline handler function for the 'getConsoleErrors' tool. It performs an HTTP GET request to the browser connector's /console-errors endpoint, parses the JSON response, and formats it as a text content block for the MCP response.async () => { return await withServerConnection(async () => { const response = await fetch( `http://${discoveredHost}:${discoveredPort}/console-errors` ); const json = await response.json(); return { content: [ { type: "text", text: JSON.stringify(json, null, 2), }, ], }; }); }