Skip to main content
Glama

Robot Actions — Remote Device Control

android_devtools_capture_network

Capture network requests made by a page running on the device over a time window via CDP. Enables the Network domain and collects request/response/loadingFinished/loadingFailed events. LIVE-WINDOW collector: only captures requests made AFTER it attaches — to capture a navigation/reload/fetch, pass triggerJs (fired inside the window) rather than triggering it from a separate tool call (which races the attach and returns 0 records). Returns { records, bodiesOmitted? } in summary format, or a HAR 1.2 document when format="har". Each record: { requestId, method, url, requestHeaders?, status?, statusText?, mimeType?, resourceType?, responseHeaders?, encodedDataLength?, state, errorText?, startTimestamp?, endTimestamp?, body?, bodyTruncated?, bodyError? }. Set includeBodies=true to fetch response bodies for completed text-like responses (json|text|xml|javascript|html|css|svg|x-www-form-urlencoded); per-body cap: 10 000 chars (bodyTruncated=true when hit); total cap: 200 000 chars (excess records counted in bodiesOmitted). Body fetch failures set bodyError on that record. Set throttle to emulate network conditions for the capture window only (cleared in a finally block): slow-3g (latency 2000ms, 400kbps down/up), fast-3g (latency 563ms, 1.6Mbps down / 750kbps up), offline. When throttle was active, a top-level throttle field appears in the output. Set blockUrls (URL patterns) to block matching requests, or extraHeaders to inject request headers (e.g. Authorization), for the capture window only — both cleared afterward. Returns at most limit records (default 100, most-recent first) so heavy pages stay within the token budget — filter with urlSubstring / onlyErrors; total/returned appear when records were dropped. Default window: 5 000 ms. Maximum: 30 000 ms. Omit pageId to auto-select the visible/active page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesDevice serial number (UDID)
limitNoMax records to return, most-recent first (default 100). Heavy pages make hundreds of requests; the default keeps the response within the MCP token budget. total/returned are included when records were dropped.
formatNoOutput format: "summary" (default) returns { records, bodiesOmitted? }; "har" returns a HAR 1.2 document
pageIdNoTarget page id (auto-picked when omitted)
socketNoAbstract unix socket name (default: chrome_devtools_remote)
throttleNoEmulate network conditions for the capture window only (cleared in a finally block). slow-3g: latency 2000ms, 400kbps down/up. fast-3g: latency 563ms, 1.6Mbps down / 750kbps up. offline: no connectivity.
blockUrlsNoBlock requests whose URL matches any of these patterns (wildcards allowed, e.g. "*.doubleclick.net", "*/analytics*") for the capture window ONLY (cleared afterward). Blocked requests surface as failed. Use to capture without third-party/analytics noise.
triggerJsNoJavaScript run INSIDE the capture window (right after the collector attaches) so the requests it triggers are captured race-free — e.g. "location.reload()", "location.href='https://example.com'", or "fetch('/api/x')". Prefer this over navigating/reloading from a separate tool call, which races the collector attach and yields 0 records.
durationMsNoCollection window in milliseconds (default: 5000, max: 30000)
onlyErrorsNoOnly failed / 5xx records
extraHeadersNoExtra HTTP headers added to every request for the capture window ONLY (cleared afterward), e.g. { "Authorization": "Bearer …" } to capture authenticated requests. These are session-scoped, which is why they apply only during this capture.
urlSubstringNoOnly records whose URL contains this substring — target the requests you care about
includeBodiesNoFetch response body for completed text-like responses (default: true). Request bodies (postData) are always captured. Set false to skip response bodies for a lighter payload. Per-body cap: 10 000 chars. Total cap: 200 000 chars.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/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 behavioral burden and does so thoroughly. It discloses the live-window limitation, cleanup of throttle/blockUrls/extraHeaders in finally blocks, body truncation caps (10k/200k chars), bodyError handling, dropped-record reporting, and output shape — all details the agent needs to predict side effects and return behavior.

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?

The description is dense but every sentence carries operational value; there is no filler or repetition of structured facts. It front-loads the core purpose and return contract, then organizes modifiers (bodies, throttle, blocking, limits, defaults) in a logical flow suited to a 13-parameter tool with no output schema.

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 the tool's complexity and the absence of both annotations and an output schema, the description is remarkably complete: it defines the record shape, failure modes, caps, cleanup behavior, defaults, maximums, and page selection. An agent has nearly everything needed to invoke it correctly and interpret results.

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 useful behavioral nuance beyond the schema: triggerJs must fire inside the window, blockUrls patterns can use wildcards, throttle is only active for the capture window, and limit/dropped-record behavior protects token budget. This lifts it above baseline.

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 opens with a specific verb+resource: "Capture network requests made by a page running on the device over a time window via CDP." It also clarifies scope distinctly from device-level or iOS traffic capture by emphasizing page-level CDP collection, which distinguishes it from siblings like android_traffic_start and ios_safari_capture_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 description gives extensive operational guidance: use triggerJs for race-free navigation/reload, set includeBodies=false for lighter payloads, filter via urlSubstring/onlyErrors, and omit pageId to auto-select the active page. It does not explicitly name alternative tools or state when to prefer a sibling, so it stops short of full alternative-based routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources