Skip to main content
Glama

get_request_initiator

Read-only

Trace which JavaScript code initiated a retained HTTP request by providing its request ID.

Instructions

Non-pausing first action for tracing which JavaScript initiated a retained HTTP request when CDP initiator evidence was active. Pass the reqid from list_network_requests; because initiator capture starts lazily and is not retroactive, an older request may have no stack—in that case reproduce the action and inspect the new reqid, or set break_on_xhr before reproduction when runtime values are required. If the captured stack identifies the code, inspect its URL/location with get_script_source. If arguments, locals, or a dynamically built payload are still needed, use break_on_xhr, reproduce, then call get_paused_info or evaluate_script before stepping or resuming. This tool only reads retained evidence and does not pause or reproduce the request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYesNumeric reqid returned by list_network_requests, not a raw CDP request ID. It survives navigation while retained, but becomes stale after FIFO eviction or clear_network_requests; list requests again if needed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool completed successfully.
dataNoMachine-readable result payload.
toolYesStable MCP tool name.
errorNo
summaryYesConcise human-readable outcome.
Behavior4/5

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

Annotations already mark as read-only and non-destructive. Description adds key behavioral details: non-pausing, reads retained evidence, initiator capture is lazy and not retroactive. No contradiction.

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?

Single paragraph that is front-loaded with purpose and then flows into usage and alternatives. Every sentence is informative, though slightly dense; could be restructured but remains efficient.

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?

Given the tool's complexity and the presence of annotations and output schema, the description covers all contextual aspects: limitations, reproduction strategies, and references to sibling tools. Complete.

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 covers requestId fully with description. Tool description adds operational context: pass reqid from list_network_requests, notes on staleness and reproducibility. Provides value beyond schema.

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?

Clearly states it retrieves the JavaScript initiator for a retained HTTP request, with a specific verb and resource. Distinguishes from siblings by mentioning alternatives like get_script_source, break_on_xhr.

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

Usage Guidelines5/5

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

Provides explicit when-to-use (pass reqid from list_network_requests), when-not-to-use (older request may have no stack), and alternatives (reproduce, set break_on_xhr, use get_paused_info, evaluate_script).

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/zhizhuodemao/js-reverse-mcp'

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