Skip to main content
Glama
titaniumtushar

burp-mcp-plus

dedup_load

Load a deduped_requests.txt file from Burp's Deduped HTTP History + JS Exporter extension, providing a named source of deduplicated requests for structured HTTP request creation.

Instructions

Load a deduped_requests.txt file produced by the user's Burp Deduped HTTP History + JS Exporter extension.

path: filesystem path (absolute or ~-expandable). name: identifier to address this source by in later calls. Default: parent directory name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'dedup_load' — registers a dedup file via dedup.register and returns JSON with name, path, and entry count.
    @mcp.tool()
    def dedup_load(path: str, name: str | None = None) -> str:
        """Load a `deduped_requests.txt` file produced by the user's Burp
        `Deduped HTTP History + JS Exporter` extension.
    
        `path`: filesystem path (absolute or ~-expandable).
        `name`: identifier to address this source by in later calls. Default:
            parent directory name.
        """
        src = dedup.register(path, name)
        return json.dumps({"name": src.name, "path": src.path, "entries": len(src.entries)}, indent=2)
  • The @mcp.tool() decorator registers dedup_load as an MCP tool on the FastMCP server instance.
    @mcp.tool()
  • dedup.register: resolves the path, parses the file, stores the source in _REGISTRY, and returns the DedupSource.
    def register(path: str, name: str | None = None) -> DedupSource:
        p = os.path.abspath(os.path.expanduser(path))
        if not os.path.isfile(p):
            raise FileNotFoundError(p)
        if name is None:
            # Default name: parent dir basename, fall back to file stem.
            parent = os.path.basename(os.path.dirname(p)) or os.path.splitext(
                os.path.basename(p)
            )[0]
            name = parent
        entries = parse_dedup_file(p)
        src = DedupSource(name=name, path=p, entries=entries)
        _REGISTRY[name] = src
        return src
  • parse_dedup_file: parses the custom deduped_requests.txt format, extracting entries with metadata, request, and response.
    def parse_dedup_file(path: str | Path) -> list[DedupEntry]:
        text = Path(path).read_text(errors="replace")
        # Split on the long === line that delimits each entry header.
        # The format puts === lines around the metadata header. Easiest robust
        # parse: split by "-- REQUEST --" and walk back/forward.
        parts = text.split("-- REQUEST --")
        entries: list[DedupEntry] = []
        # parts[0] is the file preamble; parts[1..] each begin with the request
        # body, then "-- RESPONSE --", then response, then the next entry's
        # metadata header.
        # The metadata for entry i lives at the END of parts[i] (preceded by ===).
        for i in range(1, len(parts)):
            # Metadata for THIS entry sits at the end of the PREVIOUS chunk.
            prev = parts[i - 1]
            meta_match = _HEADER_RE.findall(prev)
            if not meta_match:
                continue
            idx_s, method, url = meta_match[-1]
            try:
                idx = int(idx_s)
            except ValueError:
                continue
            # Status/Length/Parameters from the trailing portion of prev.
            # Find the last header block in prev.
            last_eq = prev.rfind("======")
            meta_block = prev[max(0, prev.rfind("====", 0, last_eq) - 200):]
            status_m = _STATUS_RE.search(meta_block)
            length_m = _LENGTH_RE.search(meta_block)
            params_m = _PARAMS_RE.search(meta_block)
            status = int(status_m.group(1)) if status_m else None
            length = int(length_m.group(1)) if length_m else None
            parameters = params_m.group(1).strip() if params_m else ""
            # Body is parts[i] up to "-- RESPONSE --"; response is after.
            body = parts[i]
            if "-- RESPONSE --" in body:
                req_block, resp_block = body.split("-- RESPONSE --", 1)
            else:
                req_block, resp_block = body, ""
            # Trim the dashed separator line "-----..." from end of req_block.
            req_clean = re.sub(r"\n-{40,}\s*$", "", req_block.strip("\r\n"), count=1)
            # Trim the next entry's "===..." from start of resp_block.
            resp_clean = resp_block
            next_eq = resp_clean.find("\n========================================")
            if next_eq != -1:
                resp_clean = resp_clean[:next_eq]
            resp_clean = resp_clean.strip("\r\n")
            entries.append(
                DedupEntry(
                    index=idx,
                    method=method,
                    url=url,
                    status=status,
                    length=length,
                    parameters=parameters,
                    request=req_clean,
                    response=resp_clean,
                )
            )
        return entries
  • Data model classes DedupEntry and DedupSource defining the schema for parsed dedup file entries.
    @dataclass
    class DedupEntry:
        index: int  # 1-based as in the file
        method: str
        url: str
        status: int | None
        length: int | None
        parameters: str
        request: str
        response: str
    
        def host_path(self) -> tuple[str, str]:
            # url is full https://host[:port]/path
            m = re.match(r"https?://([^/]+)(/.*)?$", self.url)
            if not m:
                return "", self.url
            host = m.group(1)
            path = m.group(2) or "/"
            return host, path
    
    
    @dataclass
    class DedupSource:
        name: str
        path: str
        entries: list[DedupEntry]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must cover behavior. It only states 'load' without explaining side effects, permissions, or what happens on load (e.g., parsing, storage). The presence of an output schema is not leveraged to describe output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences and parameter definitions, front-loaded with the core action. No unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains parameters but omits behavioral details like error handling or output format. Given the output schema exists, the description could be more complete about the loading process, making it adequate but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description adds meaningful detail: path is filesystem path (absolute or ~-expandable), name is an identifier defaulting to parent directory name. This goes beyond the schema's type-only definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool loads a 'deduped_requests.txt' file from a specific Burp extension, using a specific verb and resource. This distinguishes it from sibling tools like dedup_get and dedup_list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for loading files from the named extension, but it does not explicitly state when to use this tool versus alternatives (e.g., dedup_get for already-loaded data). Some context is provided but no direct comparison.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/titaniumtushar/burp-mcp-plus'

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