getNetworkErrors
Retrieve network error logs from browser sessions to identify and troubleshoot connectivity issues.
Instructions
Check our network ERROR logs
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getNetworkErrors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- browser-tools-mcp/mcp-server.ts:216-232 (handler)The inline handler function for the 'getNetworkErrors' MCP tool. It establishes a connection to the browser server, fetches network error logs from the '/network-errors' endpoint, formats the JSON response as text content, and marks it as an error response.
server.tool("getNetworkErrors", "Check our network ERROR logs", async () => { return await withServerConnection(async () => { const response = await fetch( `http://${discoveredHost}:${discoveredPort}/network-errors` ); const json = await response.json(); return { content: [ { type: "text", text: JSON.stringify(json, null, 2), }, ], isError: true, }; }); }); - browser-tools-mcp/mcp-server.ts:216-232 (registration)Registers the 'getNetworkErrors' tool with the MCP server using server.tool(), providing a description and the inline handler function.
server.tool("getNetworkErrors", "Check our network ERROR logs", async () => { return await withServerConnection(async () => { const response = await fetch( `http://${discoveredHost}:${discoveredPort}/network-errors` ); const json = await response.json(); return { content: [ { type: "text", text: JSON.stringify(json, null, 2), }, ], isError: true, }; }); });