proxy_get_traffic_log
Retrieve and filter captured HTTP/HTTPS traffic logs based on domain, method, timestamp, or limit, enabling precise monitoring and analysis of web proxy activity.
Instructions
Get captured traffic log with filtering options
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | Filter by specific domain | |
| limit | No | Maximum number of entries to return | |
| method | No | Filter by HTTP method (GET, POST, etc.) | |
| since | No | ISO timestamp to get entries since |
Implementation Reference
- src/tools/tool-handlers.js:338-355 (handler)The core handler logic for the 'proxy_get_traffic_log' tool. It retrieves traffic entries from the analyzer using filters (domain, method, limit, since), formats them into a readable log text, and returns as MCP-formatted content.case 'proxy_get_traffic_log': const entries = this.trafficAnalyzer.getEntries({ domain: args.domain, method: args.method, limit: args.limit, since: args.since ? new Date(args.since) : undefined }); const logText = entries.map(entry => `[${entry.timestamp}] ${entry.method} ${entry.url} -> ${entry.statusCode} (${entry.responseTime}ms)` ).join('\n'); return { content: [{ type: "text", text: `📈 Traffic Log (${entries.length} entries)\n\n${logText || 'No traffic captured'}` }] };
- The tool schema definition, providing input validation schema for arguments: domain, method, limit, and since.proxy_get_traffic_log: { name: "proxy_get_traffic_log", description: "Get captured traffic log with filtering options", inputSchema: { type: "object", properties: { domain: { type: "string", description: "Filter by specific domain" }, method: { type: "string", description: "Filter by HTTP method (GET, POST, etc.)" }, limit: { type: "number", description: "Maximum number of entries to return", default: 50 }, since: { type: "string", description: "ISO timestamp to get entries since" } } } },