network-conditions
Simulate latency, bandwidth caps, or offline connections to test loading states, retries, and timeouts; omit conditions to reset.
Instructions
Add latency, cap speed or simulate an offline connection. Use when testing loading states, retries or timeouts. Each call replaces the previous conditions. Omit the conditions to reset after the test. Returns the scope and applied conditions. A reset returns null for conditions. On a local iOS simulator, Argent shapes one app's intercepted HTTP traffic. While online, Argent forwards requests immediately and delays delivery to the app. Native devtools must be connected. WebSockets and the Metro port are exempt. Follow message if the result includes a status. On Android, Argent shapes traffic that uses the system proxy. Restart the app if existing connections bypass shaping. Throttling fails if the emulator has a proxy Argent did not set. Ethernet can prevent offline mode. Reset if a crash leaves the emulator unable to connect. On Chromium, Argent shapes the active page. Workers and cross-site iframes are outside its scope. Fails on physical devices and remote iOS simulators.
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>"
},
"name": "network-conditions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Metro port to exempt from shaping on iOS and Android. Omit for the device's port (usually 8081). Range: 1 to 65535. | |
| udid | Yes | Device ID from list-devices. | |
| offline | No | Make requests fail as if the network were down. On Android, adb reverse ports stay reachable, but Metro at 10.0.2.2 does not. False alone resets the conditions. | |
| bundleId | No | Bundle ID of the app to shape. Required on iOS and ignored elsewhere. | |
| latencyMs | No | Delay in milliseconds. Android adds it per round trip. iOS and Chromium use it as a minimum response delay. Range: 0 to 60000. | |
| uploadKbps | No | Upload limit in kilobits per second. Minimum: 1. | |
| downloadKbps | No | Download limit in kilobits per second. Minimum: 1. |