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+):
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').
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
| Name | Required | Description | Default |
|---|---|---|---|
| request_id | Yes |