Skip to main content
Glama

Network traffic

capture_network

Captures 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

NameRequiredDescriptionDefault
idNo
addNo
appNo
harNo
hasNoin its body: path=value or text
viaNo
diffNoagainst this id
fromNorules from a request id or a .har
pathNoa body value: data.items[0].id
saveNo
afterNoonly requests after this id
limitNo
proxyNo
rulesNoEach "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
shapeNokeys and types, no values
actionYes
bodiesNo
methodNo
statusNo404, 4xx, failed
strictNoa 5xx or a failed request fails the action
containsNo
throttleNofull, slow, edge, 3g, lte, offline, bytes/s down, or "delayMs= down= up= loss="
overwriteNo
timeoutMsNo
unmatchedNoa request no rule takes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.4

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With only openWorldHint in annotations, the description adds meaningful behavior: probe restarts the app, check fails with the nearest request, mock rules replace or clear previous rules, unmatched requests can pass or fail, returns are bounded, and no certificate is installed. It does not explain proxy cleanup or permission requirements, but it discloses substantially more than the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the definition avoids wasteful prose, but the single semicolon-heavy action list is telegraphic and sometimes too compressed, such as 'what each way sees here, or why not.' The size is appropriate, but readability suffers.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 25-parameter tool with no output schema and minimal annotations, the description covers all action enum values and several important behaviors. However, many parameters and return-value details remain undocumented, so it is adequate for core use but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are 25 parameters with only 44% schema description coverage. The description clarifies several parameters such as id, via proxy/probe, bodies, strict, contains, method, status, har, save, rules, add, from, unmatched, and throttle, but leaves app, path/has, diff, after, limit, shape, overwrite, timeoutMs, and the packets/bytes via values unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource: capturing an app's HTTP network traffic, with mocking and throttling as additional capabilities. It also explicitly distinguishes whole-device capture by pointing to set_device network.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The action-by-action list explains what each action is for: paths, start, read, check, mock, throttle, and stop. It also names set_device network as the whole-device alternative, though it gives little explicit prerequisite or ordering guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.