Skip to main content
Glama

page_wait

Read-only

Blocks until a browser page logs a matching event, then returns events with a cursor so agents can avoid polling and prevent missed or duplicate events.

Instructions

Block until the page logs an event (scribe.signal or data-scribe-signal; Scribe logs some too, like claim_lost) and return the matching events, oldest first, with a cursor. Event data is small (e.g. { card: "c_12" }); read the rest with page_state or a page action. Pass the cursor as after next time so nothing is missed or seen twice. Use it instead of polling page_state. In the result, timedOut: tell the user and wait again with the same after; closed: the user closed the tab (page_open it or stop); deleted: stop; missed: older events dropped out of the log, so scan the state.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "page_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoTab id, e.g. t_ab12cd34.
keyNoPage key, e.g. scribe:sprint-notes.
afterNoCursor from the last page_wait (or page_state's eventCursor). Omit to wait for new events only.
whereNoMatch fields on event data (as text), e.g. { column: "grok issues" }.
eventsNoComma-separated event names (approved,rejected). Omit for any event.
timeoutMsNoDefault 7200000 (2 hours); no maximum.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond readOnlyHint=true by disclosing that the call blocks (long-lived by nature), that events are returned oldest-first with a cursor, that event payloads are small and require a follow-up read, and how each result status (timedOut/closed/deleted/missed) should be interpreted. It does not spell out blocking/permission edge cases beyond the schema-documented timeout, so not quite a 5.

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 purpose and cursor discipline, and nearly every clause carries operational value. The heavy parenthetical asides and run-on result handling make it denser to parse than it needs to be, but there is no filler.

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?

No output schema exists, yet the description explains the return shape (ordered events plus cursor) and the meaning of each result flag, and it closes the loop on cursor reuse and next actions. For a 6-param blocking tool with nested 'where', this is sufficient to call it correctly.

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; the description still adds real meaning about the 'after' cursor (pass the value from the previous call so nothing is missed or seen twice) and clarifies that event data is small and matched via where. It doesn't add detail on id/key precedence or event-name formatting beyond the schema examples.

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: block until the page logs an event (scribe.signal / data-scribe-signal, plus Scribe's own like claim_lost) and return matching events oldest-first with a cursor. This is clearly distinguishable from page_state and page_action, which the description names as the way to read full state.

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?

Explicitly says 'Use it instead of polling page_state' and routes elsewhere ('read the rest with page_state or a page action'). It also gives condition-action guidance for each terminal result: timedOut -> retry with same after, closed -> page_open or stop, deleted -> stop, missed -> scan state.

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