Skip to main content
Glama

sleeper_wait_xhr

Pauses automation until a browser XHR request matching a URL substring occurs or times out, letting agents synchronize actions with network responses.

Instructions

Wait for XHR matching URL substring

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabNo
methodNo
profileNoBrowser ID from sleeper_sessions; optional with one connected browser.
timeout_msNo
url_substringYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and largely drops it. It does not say whether the call blocks until match, what happens on timeout (raise vs. return null), whether an already-completed XHR satisfies the wait, or what a timeout_ms of omitted means, despite exposing a timeout_ms parameter.

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

Conciseness3/5

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

It is a single front-loaded sentence with zero filler, which is structurally fine. But it is so sparse that conciseness tips into under-specification for a 5-parameter, behaviorally complex tool.

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

Completeness2/5

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

No annotations, no output schema, 5 parameters at 20% coverage, and a one-line description leave the agent without the blocking/timing/error semantics it needs to invoke this reliably. Much more disclosure is required for a wait primitive in a suite with five other wait tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 20% (only 'profile' is documented in the schema), so the description must compensate for tab, method, timeout_ms, and url_substring. It only implicitly gestures at url_substring via 'matching URL substring' and adds nothing about method matching semantics, tab targeting, or timeout units/defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The fragment 'Wait for XHR matching URL substring' identifies the verb (wait) and the resource (XHR request whose URL contains a substring), so the core action is inferable. However, it is a terse fragment with no differentiation from the many similar wait siblings (sleeper_wait, sleeper_wait_url, sleeper_wait_text, sleeper_wait_until, sleeper_network), leaving the agent to guess what kind of wait this is.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no prerequisites, and no mention of alternatives. The description never says to prefer this over sleeper_wait_url (navigation) or sleeper_wait (generic), which is exactly the ambiguity an agent faces in this dense sibling set.

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