Skip to main content
Glama

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

NameRequiredDescriptionDefault
portNoMetro port to exempt from shaping on iOS and Android. Omit for the device's port (usually 8081). Range: 1 to 65535.
udidYesDevice ID from list-devices.
offlineNoMake 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.
bundleIdNoBundle ID of the app to shape. Required on iOS and ignored elsewhere.
latencyMsNoDelay in milliseconds. Android adds it per round trip. iOS and Chromium use it as a minimum response delay. Range: 0 to 60000.
uploadKbpsNoUpload limit in kilobits per second. Minimum: 1.
downloadKbpsNoDownload limit in kilobits per second. Minimum: 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly: platform-specific mechanics (iOS interception vs. Android system proxy vs. Chromium active page), prerequisites (native devtools must be connected), scope exclusions (WebSockets, Metro port, workers, cross-site iframes), and documented failure modes (emulator proxy mismatch, Ethernet blocking offline, crash requiring reset).

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?

Well front-loaded — action, when-to-use, and reset behavior come before platform esoterica — and every platform paragraph conveys distinct operational facts. It is on the long side and some platform detail (Chromium scope) is compressed to near-fragment form, but nothing is wasteful.

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

Completeness5/5

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

For a 7-parameter tool with no output schema and no annotations, the description supplies return shape ("Returns the scope and applied conditions"), null-on-reset behavior, per-platform scope, and the 'follow message if the result includes a status' error convention. An agent has enough to invoke it correctly and interpret results without further context.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema cannot: reset semantics ("omit the conditions to reset", "False alone resets") and cross-parameter interaction where port exemption and Metro reachability differ by platform. It stops short of explaining individual parameter units, which the schema already handles well.

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?

Opens with a specific verb-and-effect triad ("Add latency, cap speed or simulate an offline connection") that names the resource being modified — network conditions on a device. It is immediately distinguishable from sibling capture/log tools like network-capture-start and view-network-logs, which observe traffic rather than shaping it.

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?

Gives concrete triggering scenarios ("testing loading states, retries or timeouts") plus essential lifecycle rules: every call replaces prior conditions and omitting conditions resets. It also states hard applicability limits (fails on physical devices and remote iOS simulators), though it does not name an alternative tool for those cases.

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