Skip to main content
Glama

Wait for a network response (optionally around a trigger)

wait_for_response

Wait for a network response matching a URL pattern and report its status, method, content-type, size, and body snippet. Trigger an action after arming to catch fast responses without missing them.

Instructions

Wait for a network response whose URL matches a pattern, and report its status, method, content-type and size, plus an optional body snippet. An optional trigger interaction fires AFTER the waiter is armed, so a fast response cannot be missed (click Save, await POST /api/save). On timeout it lists the responses it did see, to help fix the pattern. Acts on the open page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
triggerNoInteraction to run after the waiter is armed (avoiding a race), e.g. click Save. Same fields as interact_and_audit.
timeoutMsNo
urlPatternYesSubstring or * glob matched against response URLs (e.g. **/api/users). First match wins.
includeBodyNoInclude a capped snippet of the response body (text types only). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are present, so the description carries the burden. It discloses the race-avoidance timing, the response fields reported, the optional body snippet, and the timeout behavior of listing observed responses. It does not specify return structure or side effects, but for a waiter tool this is substantial.

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?

Four sentences, front-loaded with the core behavior, each adding distinct value: match/report, trigger timing, timeout diagnostics, and page scope. No fluff.

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?

The tool has no annotations and no output schema, but the description covers what it waits for, what it reports, the trigger race, and timeout diagnostics. The nested trigger schema covers parameter detail. Minor gap: no explicit success/failure return semantics, but enough to invoke 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 description coverage is 75%, already high. The description adds no detail beyond 'URL matches a pattern' and 'optional body snippet', with the trigger timing also restated in the schema's trigger description. Baseline 3 applies.

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 and resource: 'Wait for a network response whose URL matches a pattern,' and enumerates the reported fields (status, method, content-type, size, body snippet). This clearly distinguishes it from interaction, screenshot, and mocking siblings.

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?

It explicitly states the trigger fires after the waiter is armed to avoid missing fast responses, giving a concrete usage scenario ('click Save, await POST /api/save'). It does not name exclusions or alternatives, but the context is clear enough for when to use.

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