Skip to main content
Glama

await-network-request

Read-only

Waits for a network request to finish after capture starts and an action is triggered, returning match details or diagnostics to verify the request occurred.

Instructions

Check whether a request finished in the latest capture window. Call network-capture-start before the action. Call this tool after triggering the request, then stop capture when you are done. On Chromium, match the final URL and method after redirects. Other layers use the URL the app requested. Physical iPhones and Vega are unsupported. Returns the match or diagnostic details. Use match.id with view-network-request-details. A miss only means no captured request matched. Check cause and nearMisses. If capture is unreadable, follow the layer notes before repeating the action. An active JS window can restore recording after a disconnect. Requests sent before it reconnects can be missing. Fails with NETWORK_CAPTURE_NOT_STARTED if there is no usable capture window. Start capture and repeat the action. A result with success false fails an e2e step and stops a run-sequence.

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>",
      "url": "<url>"
    },
    "name": "await-network-request"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesURL text or a pattern. Match a part with no secrets. The result includes the full URL and secret placeholders are rejected.
udidYesDevice ID passed as udid to network-capture-start. The wait reuses its Metro target.
methodNoHTTP method, matched without regard to case.
statusNoExact HTTP status or a class such as "2xx". Failed requests can match if they received response headers. Range: 100 to 599.
outcomeNocomplete (default) accepts a finished response, including HTTP errors. failed accepts a request error. any accepts either.
bundleIdYesThe bundleId used for network-capture-start. On Chromium, use a valid placeholder such as argent.capture.
urlMatchNocontains (default) and equals ignore case. matches uses a case-sensitive JavaScript regular expression with no implicit anchors.
timeoutMsNoWait limit in milliseconds. Default 10000. Maximum: 120000. Must be greater than 0.
pollIntervalMsNoInterval between capture reads in milliseconds. Default 400. Range: 50 to 5000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, and the description is consistent with a read/wait operation. Beyond that it discloses platform-specific matching after redirects on Chromium, an explicit NETWORK_CAPTURE_NOT_STARTED failure mode, the fact that success=false aborts an e2e step and stops a run-sequence, and the caveat that an active JS window can restore recording and lose requests sent before reconnect.

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 core question and the call ordering, and every paragraph carries information. It is somewhat run-on with many very short sentences, and the capture-not-started condition is mentioned twice (prerequisite sentence and the error paragraph), a minor redundancy.

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 9-parameter polling tool with no output schema, it covers prerequisites, matching semantics, return hints (match.id, cause, nearMisses, success) and failure handling. It stops short of fully enumerating the returned structure, which leaves a small gap for an agent parsing a response.

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 already 100%, so 3 is the floor. The description adds genuine semantics the schema does not: URL matching uses the final post-redirect URL and method on Chromium but the app-requested URL on other layers, which directly changes how the url and method parameters should be supplied.

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 object: check whether a request finished in the latest capture window. It immediately disambiguates from siblings by naming network-capture-start as a prerequisite and view-network-request-details as the follow-up consumer of match.id.

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?

Gives an explicit ordering protocol (start capture before the action, call this after triggering, stop capture when done) and platform exclusions (physical iPhones and Vega unsupported). It also prescribes recovery: check cause and nearMisses, and follow layer notes before repeating on an unreadable capture.

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