Skip to main content
Glama
WhiteNightShadow

camoufox-reverse-mcp

get_request_initiator

Retrieve the JavaScript call stack that initiated a network request by its ID, helping trace the source code behind the request.

Instructions

Get the JS call stack that initiated a network request.

Returns a URL-matched hook stack as an investigation lead, not exact request attribution. Repeated/concurrent URLs can match a different invocation; corroborate with captured inputs. Requires inject_hook_preset("xhr"/"fetch") BEFORE navigating.

KNOWN LIMITATIONS (v0.8.1+):

  1. For requests modified by an interceptor registered BEFORE MCP's hooks (e.g. SDKs loaded via sync ), the initiator will be the interceptor's call, not the original business code. Workaround: use instrumentation(action='reload').

  2. For fetch on Firefox, Playwright-native initiator is often null. Requires inject_hook_preset('fetch', persistent=True).

Args: request_id: The ID of the request.

Returns: dict with url, initiator_stack, source, diagnostics and match_confidence. match_confidence is heuristic or unavailable; it never asserts exact identity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior5/5

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

No annotations exist, so the description carries full responsibility. It openly discloses limitations (matching may be incorrect, Firefox fetch returns null, interceptor interference) and provides workarounds. This is highly transparent.

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 longer than average due to limitations and workarounds, but it is well-structured with paragraphs and bullet points. Every sentence adds value, so it remains efficient.

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

Completeness4/5

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

Covered prerequisites, return dict fields, and limitations. Missing some context like how to retrieve request_id, but this is likely covered by sibling tools (e.g., list_network_requests). Overall sufficient for an agent.

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 has no description, but the tool description includes an Args section explaining request_id as 'The ID of the request.' This is minimal but adequate; could benefit from mentioning how to obtain the ID (e.g., from list_network_requests).

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?

States a specific action (get the JS call stack) and a specific resource (network request). Clearly distinguishes from siblings like get_network_request, which likely returns request details rather than the initiator stack.

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

Usage Guidelines4/5

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

Provides prerequisites (inject_hook_preset before navigating) and contextual guidance (investigation lead, corroborate with captured inputs). Does not explicitly name alternative tools, but the context is sufficient for typical use.

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