cdp_wait_for_network
Block until a network request matching url_pattern (URL substring) and optional method completes (response received), or timeout_ms elapses. Two-phase: scans the existing buffer first (retroactive match), then polls every poll_interval_ms until deadline. Returns {matched:true, mutation, network_log_since} on success or {matched:false, timeout_ms, candidates_seen} (capped at 10) on timeout — never errors on timeout; agents should check data.matched. Use after triggering an action that fires a request to deterministically confirm it landed without buffer-churn races. Pin since to a timestamp captured BEFORE the trigger (Date.now() ISO) to also catch mutations that land in the MCP transport window.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
url_pattern | string | Yes | URL substring to match (e.g. “/api/cart/add”, “checkout”). Same matching semantics as cdp_network_log filter. | ||
method | unknown | No | HTTP method filter, case-insensitive (e.g. “POST” or [“POST”,“PUT”]). Omit to match any method. | ||
timeout_ms | number | No | 5000 | min: 100, max: 60000, integer | Max wait in ms (default 5000, range 100-60000) |
poll_interval_ms | number | No | 100 | min: 50, max: 500, integer | Buffer poll cadence in ms (default 100, range 50-500) |
since | string | No | ISO timestamp checkpoint — ignore entries older than this. Defaults to the moment the tool is called. Capture new Date().toISOString() before the trigger action to avoid missing the mutation in the transport window. | ||
device | string | No | Device key OR “all”. Defaults to the active device. |
cdp_wait_for_network(url_pattern: <string>)