Skip to main content
Glama
WhiteNightShadow

camoufox-reverse-mcp

get_network_request

Retrieve complete details of a captured network request, including request/response headers and body. Use with request ID from list_network_requests.

Instructions

Get full details of a specific captured network request.

Args: request_id: The ID of the request (from list_network_requests). include_body: Include response body (default False). include_headers: Include request/response headers (default True). max_body_size: Max chars of body when include_body=True. Pass -1 for unlimited.

Returns: dict with request and response details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_idYes
include_bodyNo
include_headersNo
max_body_sizeNo

Implementation Reference

  • The tool handler function that retrieves full details of a specific captured network request by ID, with options to include/exclude body and headers, and truncation of large bodies.
    @mcp.tool()
    async def get_network_request(
        request_id: int,
        include_body: bool = False,
        include_headers: bool = True,
        max_body_size: int = 5000,
    ) -> dict:
        """Get full details of a specific captured network request.
    
        Args:
            request_id: The ID of the request (from list_network_requests).
            include_body: Include response body (default False).
            include_headers: Include request/response headers (default True).
            max_body_size: Max chars of body when include_body=True. Pass -1 for unlimited.
    
        Returns:
            dict with request and response details.
        """
        try:
            for r in browser_manager._network_requests:
                if r["id"] == request_id:
                    result = dict(r)
                    if not include_body:
                        body = result.pop("response_body", None)
                        result["response_body_available"] = body is not None
                        if body:
                            result["response_body_size"] = len(body)
                    else:
                        body = result.get("response_body")
                        if body is not None and max_body_size >= 0 and len(body) > max_body_size:
                            result["response_body"] = body[:max_body_size]
                            result["response_body_truncated"] = True
                            result["response_body_original_size"] = len(body)
                            result["response_body_size_returned"] = max_body_size
                        elif body is not None:
                            result["response_body_truncated"] = False
                            result["response_body_original_size"] = len(body)
                            result["response_body_size_returned"] = len(body)
                    if not include_headers:
                        result.pop("request_headers", None)
                        result.pop("response_headers", None)
                    return result
            return {"error": f"Request ID {request_id} not found"}
        except Exception as e:
            return {"error": str(e)}
  • Registration of the tool via the @mcp.tool() decorator from FastMCP, which makes it available as an MCP tool.
    @mcp.tool()
  • The network tools module (including get_network_request) is imported and registered in the MCP server via server.py.
    from .tools import network          # noqa: E402, F401  — network_capture + list/get requests
    from .tools import storage          # noqa: E402, F401  — cookies() + get_storage + export/import state
  • BrowserManager holds _network_requests deque (data source) that get_network_request iterates over to find the matching request ID.
    self._network_requests: deque[dict] = deque(maxlen=MAX_LOG_SIZE)
    self._request_id_counter = 0
Behavior3/5

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

With no annotations, the description carries full burden. It states the tool is read-only (captured request details) and describes parameters, but does not specify behavior on invalid request_id, rate limits, or performance implications. Decent coverage but lacks edge-case details.

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

Conciseness4/5

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

Description is concise (3 sentences and a param list) and front-loaded with the purpose. Each part adds value, though the returns section could be more detailed. No wasted words.

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?

Given no output schema, the description mentions return as 'dict with request and response details' but lacks specifics on structure. For 4 params, it covers param semantics well but omits error handling and response format details.

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

Parameters5/5

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

Schema coverage is 0% (no descriptions in schema), so description must compensate. It explains request_id source, default values for booleans, and the special value -1 for max_body_size. This adds significant meaning beyond schema titles and types.

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 'get full details of a specific captured network request', specifying verb and resource. It distinguishes from sibling 'list_network_requests' (which lists requests) and 'get_request_initiator' (which gets the initiator).

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 usage by referencing 'from list_network_requests' but does not explicitly state when to use this tool over alternatives, nor does it provide when-not-to-use guidance. No exclusions or prerequisites are mentioned.

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/WhiteNightShadow/camoufox-reverse-mcp'

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