dedup_search
Search a registered dedup source with regex across URL, request, response, or params. Returns match index, URL, status, and snippet. Use dedup_get for complete data.
Instructions
Regex-search a registered dedup source.
field: one of url, request, response, params, or all.
Returns matches with index + url + status + a short snippet (token-thrifty).
Use dedup_get to fetch the full request/response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| pattern | Yes | ||
| field | No | url | |
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/burp_mcp_plus/server.py:656-669 (handler)The MCP tool handler for 'dedup_search'. Decorated with @mcp.tool(), it delegates to dedup.search() and returns JSON results.
@mcp.tool() def dedup_search( name: str, pattern: str, field: str = "url", limit: int = 20, ) -> str: """Regex-search a registered dedup source. `field`: one of `url`, `request`, `response`, `params`, or `all`. Returns matches with index + url + status + a short snippet (token-thrifty). Use `dedup_get` to fetch the full request/response. """ return json.dumps(dedup.search(name, pattern, field=field, limit=limit), indent=2) - src/burp_mcp_plus/dedup.py:166-205 (helper)The core search implementation in the dedup module. Compiles a regex, searches across the selected field(s) (url, request, response, params, or all), and returns matching entries with context snippets.
def search( name: str, pattern: str, field: str = "url", limit: int = 20, flags: int = re.IGNORECASE, ) -> list[dict[str, object]]: src = get(name) rx = re.compile(pattern, flags) field = field.lower() out: list[dict[str, object]] = [] for e in src.entries: haystacks: list[str] = [] if field in ("url", "all"): haystacks.append(e.url) if field in ("request", "all"): haystacks.append(e.request) if field in ("response", "all"): haystacks.append(e.response) if field in ("params", "parameters", "all"): haystacks.append(e.parameters) for h in haystacks: m = rx.search(h) if m: # Snippet around the match for context. start = max(0, m.start() - 60) end = min(len(h), m.end() + 60) snippet = h[start:end].replace("\n", " ") out.append({ "index": e.index, "method": e.method, "url": e.url, "status": e.status, "match_field": field if field != "all" else _which_field(e, h), "snippet": snippet, }) break if len(out) >= limit: break return out - src/burp_mcp_plus/server.py:656-657 (registration)The tool is registered via the @mcp.tool() decorator on line 656, which is part of the FastMCP framework.
@mcp.tool() def dedup_search( - src/burp_mcp_plus/dedup.py:44-44 (schema)The DedupEntry dataclass defines the schema for each entry returned/used by dedup_search. Contains index, method, url, status, length, parameters, request, and response fields.
@dataclass