Skip to content

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.

NameTypeRequiredDefaultConstraintsDescription
url_patternstringYesURL substring to match (e.g. “/api/cart/add”, “checkout”). Same matching semantics as cdp_network_log filter.
methodunknownNoHTTP method filter, case-insensitive (e.g. “POST” or [“POST”,“PUT”]). Omit to match any method.
timeout_msnumberNo5000min: 100, max: 60000, integerMax wait in ms (default 5000, range 100-60000)
poll_interval_msnumberNo100min: 50, max: 500, integerBuffer poll cadence in ms (default 100, range 50-500)
sincestringNoISO 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.
devicestringNoDevice key OR “all”. Defaults to the active device.
cdp_wait_for_network(url_pattern: <string>)