await-network-request
Waits for a network request to finish after capture starts and an action is triggered, returning match details or diagnostics to verify the request occurred.
Instructions
Check whether a request finished in the latest capture window. Call network-capture-start before the action. Call this tool after triggering the request, then stop capture when you are done. On Chromium, match the final URL and method after redirects. Other layers use the URL the app requested. Physical iPhones and Vega are unsupported. Returns the match or diagnostic details. Use match.id with view-network-request-details. A miss only means no captured request matched. Check cause and nearMisses. If capture is unreadable, follow the layer notes before repeating the action. An active JS window can restore recording after a disconnect. Requests sent before it reconnects can be missing. Fails with NETWORK_CAPTURE_NOT_STARTED if there is no usable capture window. Start capture and repeat the action. A result with success false fails an e2e step and stops a run-sequence.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"udid": "<udid>",
"bundleId": "<bundleId>",
"url": "<url>"
},
"name": "await-network-request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL text or a pattern. Match a part with no secrets. The result includes the full URL and secret placeholders are rejected. | |
| udid | Yes | Device ID passed as udid to network-capture-start. The wait reuses its Metro target. | |
| method | No | HTTP method, matched without regard to case. | |
| status | No | Exact HTTP status or a class such as "2xx". Failed requests can match if they received response headers. Range: 100 to 599. | |
| outcome | No | complete (default) accepts a finished response, including HTTP errors. failed accepts a request error. any accepts either. | |
| bundleId | Yes | The bundleId used for network-capture-start. On Chromium, use a valid placeholder such as argent.capture. | |
| urlMatch | No | contains (default) and equals ignore case. matches uses a case-sensitive JavaScript regular expression with no implicit anchors. | |
| timeoutMs | No | Wait limit in milliseconds. Default 10000. Maximum: 120000. Must be greater than 0. | |
| pollIntervalMs | No | Interval between capture reads in milliseconds. Default 400. Range: 50 to 5000. |