Skip to main content
Glama

browser_wait_for_response

Read-onlyIdempotent

Wait for ONE network response whose URL matches url_pattern (substring, a glob with '*', or 're:') and optionally method/status, then return its status, safe headers and body. To catch a response caused by an action, pass trigger_ref — that element is clicked while waiting (otherwise the response must arrive after this call starts). Text bodies come back inline (256 KB cap); with save=true the body is stored as a workspace file instead (use for binary or large bodies) and file_id is returned.

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": {
      "page_id": "<page_id>",
      "url_pattern": "<url_pattern>"
    },
    "name": "browser_wait_for_response"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveNo
frameNo
methodNo
statusNo
page_idYes
filenameNo
timeout_msNo
trigger_refNo
url_patternYes
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
include_bodyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only/idempotent/non-destructive, so the description's added value is in the details: 256 KB inline body cap, headers returned are 'safe' (filtered), save=true diverts the body to a workspace file and returns file_id instead. It does not say what happens on timeout expiry or when multiple responses match the pattern. Minor tension worth noting: trigger_ref causes a click and save=true writes a file, both side effects that sit loosely with readOnlyHint=true, though the description discloses them openly rather than hiding them.

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?

A single dense paragraph, front-loaded with the core verb+scope, then the trigger mechanism, then body/return handling — a logical order. No filler sentences, though the final clause packs three separate facts (cap, save, file_id) into one sentence and would read better split.

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

Completeness3/5

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

No output schema exists, and the description does cover the return shape (status, safe headers, body or file_id), which is the main gap filled. But for a 11-parameter, timing-sensitive tool it omits timeout behavior on expiry and matching rules when several responses qualify, which an agent needs to call it reliably.

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 description coverage is only 9% across 11 params, so the description carries most of the load, and it does explain the hard ones well: url_pattern matching modes, trigger_ref semantics, save/filename-to-file_id behavior, and include_body via 'text bodies come back inline'. It leaves frame, timeout_ms and page_id to their self-evident names, and does not clarify whether filename applies when save=false.

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 — wait for ONE network response matching a URL pattern — with a precise scope adverb ('ONE'). The url_pattern syntax (substring, glob with '*', 're:<regex>') plus optional method/status filters make it clearly distinct from siblings such as browser_wait_for (time-based) and browser_network_requests (bulk listing).

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 an explicit conditional for the trigger_ref mode: pass it to catch a response caused by an action, otherwise the response must arrive after the call starts. Also gives guidance on save=true for binary or large bodies. It stops short of naming alternatives (e.g. browser_network_requests) for the case where you want all responses rather than one, so it is clear context without full 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.