Skip to main content
Glama

wipeLogs

Remove all browser logs from memory to clear sensitive data and maintain privacy. Integrated with the BrowserTools MCP for streamlined browser monitoring and data management.

Instructions

Wipe all browser logs from memory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and handler for 'wipeLogs'. Proxies the request to the browser server's /wipelogs HTTP endpoint, which clears all in-memory logs and returns the success message.
    server.tool("wipeLogs", "Wipe all browser logs from memory", async () => { return await withServerConnection(async () => { const response = await fetch( `http://${discoveredHost}:${discoveredPort}/wipelogs`, { method: "POST", } ); const json = await response.json(); return { content: [ { type: "text", text: json.message, }, ], }; }); });
  • HTTP endpoint handler for POST /wipelogs and the clearAllLogs helper function that wipes all in-memory log arrays (consoleLogs, consoleErrors, networkErrors, networkSuccess, allXhr, selectedElement). This is the core logic executed by the MCP tool.
    function clearAllLogs() { console.log("Wiping all logs..."); consoleLogs.length = 0; consoleErrors.length = 0; networkErrors.length = 0; networkSuccess.length = 0; allXhr.length = 0; selectedElement = null; console.log("All logs have been wiped"); } // Add endpoint to wipe logs app.post("/wipelogs", (req, res) => { clearAllLogs(); res.json({ status: "ok", message: "All logs cleared successfully" }); });

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/Sugatraj/Cursor-Browser-Tools-MCP'

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