Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_clear_traffic_log

Remove recorded traffic logs from the Web Proxy MCP Server. Optionally clears logs for a specific domain, with a confirmation flag to prevent accidental deletion.

Instructions

Clear the traffic log

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesConfirmation flag to prevent accidental deletion
domainNoClear logs for specific domain only

Implementation Reference

  • Handler logic for the proxy_clear_traffic_log tool. Validates the confirm flag, calls trafficAnalyzer.clearEntries with optional domain, and returns a success message with cleared and remaining entry counts.
    case 'proxy_clear_traffic_log': if (!args.confirm) { return { error: "Confirmation required to clear traffic log", isError: true }; } const cleared = this.trafficAnalyzer.clearEntries(args.domain); return { content: [{ type: "text", text: `🗑️ Traffic log cleared\nEntries removed: ${cleared}\nRemaining: ${this.trafficAnalyzer.getEntryCount()}` }] };
  • JSON schema definition for the tool inputs, requiring a confirm boolean and optionally a domain string.
    proxy_clear_traffic_log: { name: "proxy_clear_traffic_log", description: "Clear the traffic log", inputSchema: { type: "object", properties: { domain: { type: "string", description: "Clear logs for specific domain only" }, confirm: { type: "boolean", description: "Confirmation flag to prevent accidental deletion", default: false } }, required: ["confirm"] } },
  • Core utility method in TrafficAnalyzer that implements the clearing logic: filters out entries by domain if specified, or empties the entire array and resets statistics.
    /** * Clear entries * @param {string} domain - Optional domain filter * @returns {number} Number of cleared entries */ clearEntries(domain = null) { let cleared = 0; if (domain) { const originalLength = this.entries.length; this.entries = this.entries.filter(entry => !entry.domain.includes(domain) ); cleared = originalLength - this.entries.length; } else { cleared = this.entries.length; this.entries = []; this.stats = { totalRequests: 0, totalResponseTime: 0, domainsTracked: new Set(), startTime: new Date() }; } return cleared; }

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/mako10k/mcp-web-proxy'

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