Skip to main content
Glama

network-capture-stop

Stops JS or native network capture while keeping recorded requests for later analysis, then returns per-layer capture status and stop reasons.

Instructions

Stop capture and keep the recorded requests. Call this after collecting the requests you need or before profiling. Read any Android native bodies you need before stopping. On Chromium, this closes the window for await-network-request. The tab log keeps recording while Argent is attached. Returns a result for each layer. Check armed and reason. The reason can explain an unconfirmed stop or say that capture never started. If Argent fails to reach the JS runtime, retry after it reconnects to Metro.

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>"
    },
    "name": "network-capture-stop"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoThe app's Metro port for JS capture and native log filtering. Omit it only when the app uses the device's port (usually 8081); otherwise check the project's Metro start script. Chromium uses the CDP port in udid. Range: 1 to 65535.
udidYesDevice ID from list-devices.
layerNoOmit to control both layers. Selecting one leaves the other alone. Chromium ignores this setting.
bundleIdYesApp bundle ID on iOS or package name on Android. On Chromium, use a valid placeholder such as argent.capture.
logicalDeviceIdNoFor iOS simulators and Android on shared Metro, use the logical ID for the intended device if requested. Reuse it for start and stop, and as device_id for JS reads.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses that recorded data is retained, that on Chromium it invalidates await-network-request, that the tab log continues while Argent is attached, and that results are per-layer with 'armed' and 'reason' fields. It even covers a failure mode (runtime unreachable → retry after Metro reconnect), though it omits permissions or idempotency behavior for repeated stops.

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

Conciseness4/5

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

Front-loaded with the action and its key side effect, then timing, then platform caveats, then result handling. Every sentence is doing work, though the platform-specific caveats (Chromium, Android native bodies, Metro reconnect) make it dense and slightly scattered rather than cleanly grouped.

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

Completeness4/5

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

For a 5-parameter teardown tool with no output schema, the description supplies the missing return semantics ('Returns a result for each layer. Check armed and reason') and the reason-code interpretation, which is what an agent needs to judge success. Only auth/permission preconditions are absent, a minor gap here.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds only indirect parameter context — 'Returns a result for each layer' ties to the layer enum, and the native-bodies ordering hint relates to layer selection — but it does not explain the udid/port/logicalDeviceId distinction beyond what the schema already states.

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 gives a specific verb and resource ('Stop capture') plus the crucial side effect ('keep the recorded requests'), which is exactly what an agent needs to distinguish a stop-and-retain from a stop-and-discard. It also names related tools it interacts with ('await-network-request', profiling), so an agent can place it in the workflow without opening another schema.

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?

Timing is explicit: 'Call this after collecting the requests you need or before profiling,' and ordering of prerequisite reads is called out ('Read any Android native bodies you need before stopping'). It stops short of naming network-capture-start as the inverse operation or saying when NOT to stop, but the usage context is clear.

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