Skip to main content
Glama

native-network-logs

Capture native network traffic at NSURLProtocol level, including native modules, Swift/Objective-C networking, and background transfers invisible to JS fetch. Returns status, count, and events.

Instructions

Retrieve network requests captured at the native NSURLProtocol level. Unlike the JS-level network inspector (view-network-logs), this captures ALL network traffic from the app including native modules, Swift/Objective-C networking, and background transfers that bypass JS fetch. Use when you need to inspect native-level HTTP traffic that is invisible to JS fetch interception. Returns { status, count, events } where each event contains URL, method, status code, headers, and timing. If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help — restart the tool-server (argent server stop && argent server start --detach) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting — do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised — follow the message (re-boot the simulator) rather than retrying this tool. A not-running app comes back as one of those statuses rather than a failure. An app that is not connected does too, except on a device whose devtools agent argent attached to rather than armed itself — there it fails with NATIVE_DEVTOOLS_NOT_CONNECTED, since no restart of ours can complete a handshake we do not own. Failures are separate: an Apple system app is rejected outright (terminal — never retry it), while a missing host dependency or a udid that is not an Apple device is not.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesSimulator UDID
clearNoClear the log after reading
limitNoMaximum number of events to return (most recent first)
bundleIdYesBundle ID of the app

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are present, so the description carries the full burden, and it delivers: it enumerates possible statuses (restart_required, service_stale, connect_pending, init_failed), what each means, and what action to take. It also explains terminal failure cases such as Apple system apps and NATIVE_DEVTOOLS_NOT_CONNECTED, so an agent avoids retrying hopeless operations.

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

Conciseness5/5

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

It opens with a crisp statement of function and differentiation before moving into operational details. The longer status/failure sections are organized by status name, and each sentence adds a distinct recovery instruction, so the length is justified.

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?

Given there is no output schema, the description fully specifies the return shape ({ status, count, events } and event fields) and all practical status/failure branches. Combined with the high-coverage parameter schema, an agent has what it needs to invoke and react correctly.

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 coverage is 100%, with all four parameters already documented, so the baseline is 3. The description adds context about the return envelope and event fields, but it does not need to repeat parameter meanings and does not materially extend parameter semantics.

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 description names a specific resource ('network requests at the native NSURLProtocol level') and a specific action ('Retrieve'), then contrasts it with view-network-logs. It explicitly identifies coverage of native modules, Swift/Objective-C networking, and background transfers, making the tool's scope unmistakable.

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?

It states 'Use when you need to inspect native-level HTTP traffic that is invisible to JS fetch interception' and names the alternative view-network-logs. It also provides status-by-status recovery guidance, including when not to retry/restart versus restarting the tool-server or simulator.

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