Network traffic
capture_networkCaptures an app's HTTP traffic, mocks responses, and throttles network conditions so you can debug requests, test edge cases, and verify behavior on simulators, emulators, or real devices.
Instructions
Capture an app's network traffic (HTTP), mock its answers, throttle it. paths: what each way sees here, or why not; start (via proxy: at proxy host:port; probe: restarts the app; bodies; strict); read (id: one request whole; contains, method, status; har: a proxy's export; save: a .har); check: waits for a request, failing with the nearest; mock (rules; add; from: a file of answers; unmatched); throttle; stop. The whole device: set_device network. Returns requests, bounded; installs no certificate.
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": {
"action": "<action>"
},
"name": "capture_network"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| add | No | ||
| app | No | ||
| har | No | ||
| has | No | in its body: path=value or text | |
| via | No | ||
| diff | No | against this id | |
| from | No | rules from a request id or a .har | |
| path | No | a body value: data.items[0].id | |
| save | No | ||
| after | No | only requests after this id | |
| limit | No | ||
| proxy | No | ||
| rules | No | Each "host/path* [method=] [query=] [regex=] [has=] [when=]" then "status= body= (@file) type= header=", "fail=offline|timeout|reset" or "to=host", and delayMs= times= off. Replaces; [] clears; none lists | |
| shape | No | keys and types, no values | |
| action | Yes | ||
| bodies | No | ||
| method | No | ||
| status | No | 404, 4xx, failed | |
| strict | No | a 5xx or a failed request fails the action | |
| contains | No | ||
| throttle | No | full, slow, edge, 3g, lte, offline, bytes/s down, or "delayMs= down= up= loss=" | |
| overwrite | No | ||
| timeoutMs | No | ||
| unmatched | No | a request no rule takes |