Skip to main content
Glama
camoufox-reverse-mcp

camoufox-reverse-mcp

intercept_request

Intercept matching network requests to log, block, modify, or mock responses, or stop interception for JavaScript reverse engineering and dynamic debugging.

Instructions

Intercept network requests matching a pattern.

Args: url_pattern: URL glob pattern (e.g. "**/api/login*"). action: "log", "block", "modify", "mock", or "stop" (unroute). modify_headers: Headers to add/override (action="modify"). modify_body: Request body replacement (action="modify"). mock_response: Dict for action="mock": "status", "headers", and at most one body source — "body" (inline text) or "body_file" (regular UTF-8 file up to 10 MiB; relative paths resolve against the server working directory). Passing both is an error. The file is re-read on every request in a worker thread, so editing a patched script and reloading the page picks up changes immediately; a missing or unreadable file returns a readable error from the tool call (and aborts that request during serving). When "headers" is omitted, body_file infers the content type from its suffix (.js/.json/.html/.css/...). Security note: fulfilled responses are readable by scripts in the matching page/origin — only point body_file at intended mock or instrumented assets, never at credentials or private local files.

Returns: dict with the interception status; for action="mock" with body_file it also reports the resolved absolute path and its current byte size.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url_pattern": "<url_pattern>"
    },
    "name": "intercept_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionNolog
modify_bodyNo
url_patternYes
mock_responseNo
modify_headersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv1.1.1
    • addedInput schema / properties / mock_response / additionalProperties
      Added value: +true
    • removedInput schema / properties / mock_response / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / mock_response / default
      Removed value: -null
    • addedInput schema / properties / mock_response / type
      Added value: +"object"
    • removedInput schema / properties / modify_body / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / modify_body / default
      Removed value: -null
    • addedInput schema / properties / modify_body / type
      Added value: +"string"
    • addedInput schema / properties / modify_headers / additionalProperties
      Added value: +true
    • removedInput schema / properties / modify_headers / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / modify_headers / default
      Removed value: -null
    • addedInput schema / properties / modify_headers / type
      Added value: +"object"
  2. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it discloses that body_file is re-read on every request in a worker thread, that a missing file surfaces a readable error and aborts the request, content-type inference from suffix, the 10 MiB limit, path resolution rules, and a security caveat about fulfilled responses being script-readable. What it omits is lifecycle behavior — whether interceptors persist across navigations, how they are cleared, or permission requirements.

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?

Args/Returns structure with the core verb front-loaded makes it scannable, and the detailed mock_response paragraph is dense but almost every sentence conveys operational fact. The inline rationale about editing a patched script and reloading the page is helpful but slightly verbose for a parameter description.

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

Completeness5/5

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

For a 5-parameter tool with nested objects, no annotations, and no output schema, the definition covers argument meaning, error behavior, file handling, and even describes the return value (status dict plus resolved path and byte size for mock+body_file). The remaining gap around interceptor lifetime is minor relative to the overall coverage.

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 description coverage is 0%, so the description must compensate entirely, and it does: every parameter is explained with a concrete glob example for url_pattern, enumerated action values, and a full breakdown of the nested mock_response object including the mutual exclusion of body and body_file. It adds meaning well beyond the bare property names in the schema.

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

Purpose4/5

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

The first line pairs a specific verb and resource ("Intercept network requests") with a scoping condition ("matching a pattern"), and the action list clarifies the tool performs interception in five distinct modes. It does not explicitly distinguish itself from siblings like list_network_requests or network_capture, which an agent might reasonably confuse with it.

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 per-action semantics (log, block, modify, mock, stop/unroute) implicitly tell the agent which mode to pick for a goal, which is real guidance. However, there is no explicit statement of when to reach for this tool versus network_capture, hook_function, or save_response_body, and no prerequisites such as requiring an active page or prior interception.

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