Skip to main content
Glama

native-network-logs

Lists native HTTP requests from iOS simulators and debuggable Android builds to debug native module or SDK traffic. Start capture first; logs remain readable after capture stops.

Instructions

List native HTTP requests from URLSession and NSURLConnection on iOS simulators, or OkHttp in a debuggable Android build. Use when debugging traffic from a native module or SDK. Coverage excludes background URLSession transfers, WKWebView and Network.framework. Call network-capture-start before triggering requests. Returns recent requests oldest first, with capture status and coverage in header. The log stays readable after capture stops. Pass an ID to view-network-request-details. On an iOS simulator, a blocked read returns status and a message with the next action. Follow the message before retrying. If the call fails with NATIVE_DEVTOOLS_NOT_CONNECTED, follow its message. An Apple system app is rejected outright (terminal: never retry it).

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": "native-network-logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoExclude requests to this Metro port on local addresses. Omit it to use the device's Metro port (usually 8081). Range: 1 to 65535.
udidYesDevice ID from list-devices: an iOS simulator UDID or Android serial
clearNoHide existing history from later lists. Cleared request IDs still work in view-network-request-details. Default: false.
limitNoTake the newest matching requests and return them oldest first. Use 0 for capture status and totals without entries. Default: 50. Minimum: 0.
bundleIdYesApp bundle ID on iOS or package name on Android.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / bundleId / description
      Previous value: -"Bundle ID of the app"New value: +"App bundle ID on iOS or package name on Android."
    • changedInput schema / properties / clear / description
      Previous value: -"Clear the log after reading"New value: +"Hide existing history from later lists. Cleared request IDs still work in view-network-request-details. Default: false."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of events to return (most recent first)"New value: +"Take the newest matching requests and return them oldest first. Use 0 for capture status and totals without entries. Default: 50. Minimum: 0."
    • addedInput schema / properties / limit / minimum
      Added value: +0
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / port
      Added value: +{
      +  "description": "Exclude requests to this Metro port on local addresses. Omit it to use the device's Metro port (usually 8081). Range: 1 to 65535.",
      +  "maximum": 65535,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / udid / description
      Previous value: -"Simulator UDID"New value: +"Device ID from list-devices: an iOS simulator UDID or Android serial"
  2. First observedv0.15.0

TDQS

A4.5/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: result ordering (oldest first), header content (capture status and coverage), post-capture readability, blocked-read messaging on iOS simulators, an explicit NATIVE_DEVTOOLS_NOT_CONNECTED failure mode, and a hard 'never retry' rule for Apple system apps. This is exactly the failure-handling context an autonomous agent needs and cannot get from the schema.

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 capability and scope, then prerequisites, then failure handling in descending priority — good structure. Some lines are terse to the point of ambiguity ('a blocked read returns status and a message with the next action'), and the error-handling tail could be tightened, but nearly every sentence carries real operational content.

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?

With no output schema, the description must describe returns, and it does at a high level: ordering, header with capture status and coverage, and pointer to view-network-request-details for entry fields. It stops short of describing the shape of individual request entries themselves, which is the one remaining gap for a list tool.

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 each of the five parameters is already documented in detail (port exclusion, clear, limit with 0 semantics, udid, bundleId). The description adds only a light cross-reference that request IDs still work with view-network-request-details, which is marginal since clear's schema text already says that. Baseline 3 is appropriate.

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?

States a specific verb and resource ('List native HTTP requests') plus the exact underlying APIs (URLSession, NSURLConnection, OkHttp) and platform scope (iOS simulator, debuggable Android build). The word 'native' and the debugging-native-SDK framing let an agent separate it from the sibling view-network-logs without opening any schema.

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

Usage Guidelines5/5

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

Explicit when-to-use ('debugging traffic from a native module or SDK'), explicit when-not-to-use via coverage exclusions (background URLSession, WKWebView, Network.framework), and a stated prerequisite ordering ('Call network-capture-start before triggering requests'). It even routes to view-network-request-details for per-request detail, so the agent never has to guess which tool applies.

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