proxy_search_traffic
Search captured HTTP/HTTPS traffic across URLs, headers, and body content to analyze network activity and identify specific requests.
Instructions
Full-text search across URLs, headers, and body previews of captured traffic.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search string | |
| limit | No | Max results (default: 20) |
Implementation Reference
- src/tools/traffic.ts:95-125 (handler)The implementation of the `proxy_search_traffic` MCP tool, which utilizes `proxyManager.searchTraffic` to perform a search and returns summarized results.
server.tool( "proxy_search_traffic", "Full-text search across URLs, headers, and body previews of captured traffic.", { query: z.string().describe("Search string"), limit: z.number().optional().default(20).describe("Max results (default: 20)"), }, async ({ query, limit }) => { const results = proxyManager.searchTraffic(query).slice(0, limit); const summaries = results.map((t) => ({ id: t.id, timestamp: t.timestamp, method: t.request.method, url: t.request.url, status: t.response?.statusCode ?? null, duration: t.duration ?? null, })); return { content: [{ type: "text", text: truncateResult({ status: "success", query, matches: summaries.length, results: summaries, }), }], }; }, );