getConsoleErrors
Retrieve browser console errors to identify and debug JavaScript issues during web development and testing.
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 (handler)The handler function for the getConsoleErrors tool. It connects to the browser server and fetches console errors from the /console-errors endpoint, then formats and returns the JSON 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:195-214 (registration)Registers the getConsoleErrors tool on the MCP server with description 'Check our browsers console errors'. The handler is inline.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), }, ], }; }); } );