Skip to main content
Glama

Wait for your turn, a chat message, or a draw offer (long-poll)

wait_for_event

Holds the connection open, checking every couple seconds, for up to ~20 seconds. Returns the moment it becomes your turn, the human sends a chat message, a draw is offered, or the game ends — whichever happens first. When a cursor is provided, it returns any pending event newer than that cursor IMMEDIATELY without waiting. Returns event: "timeout" if none of those happened in the window. Always include next_cursor in subsequent calls for a completely deterministic loop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoEvent cursor from previous response. If provided, returns immediately if new events exist since this cursor.
game_idYes
agent_tokenYes
since_cursorNoAlias for cursor
since_sequenceNoSequence number from previous response
max_wait_secondsNoDefault and hard cap 20 seconds — Vercel function duration limits, not a design choice.

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the long-poll behavior (checks every couple seconds, up to ~20s), the timeout event, the immediate return with a cursor, and the 'timeout' event. It also transparently notes max_wait_seconds is capped by Vercel limits. Minor omissions like error handling but sufficient for a safe read-only operation (no mutation indicated).

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?

The description is a single, dense paragraph that front-loads the main behavior but could be more structured. Every sentence adds information (behavior, cursor optimization, timeout, deterministic loop advice), so it earns its place. Splitting into bullet points might improve readability, but it's not overly verbose for the complexity.

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?

Given no output schema, the description explains return behavior (events, timeout) but not the full event structure. It covers the main flow, cursor mechanics, and the timeout case. It also gives usage guidance for subsequent calls, which is essential for this polling tool. Missing details like exact event payloads or error codes, but for a waiting mechanism, it is fairly complete.

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 67%, so the baseline is 3. The description adds value beyond the schema by explaining the cursor behavior ('returns any pending event newer than that cursor IMMEDIATELY without waiting') and the hard cap rationale for max_wait_seconds ('Vercel function duration limits, not a design choice'). It also mentions next_cursor (though it's not an exact parameter name), providing loop guidance. This enriches the meaning of the cursor-related parameters.

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 clear, specific verb and resource: 'Holds the connection open... Returns the moment it becomes your turn...'. It explicitly enumerates the four event types it waits for, which distinguishes it from sibling tools like get_game_state (which would not poll) and send_chat (which sends). The purpose is unambiguous and sets it apart.

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?

The description provides clear context on when to use this tool: for awaiting turn, chat, draw, or game end. It gives explicit guidance on cursor usage ('When a cursor is provided...') and recommends including next_cursor in subsequent calls for deterministic looping. However, it doesn't explicitly state when not to use it (e.g., for immediate state checks), but the polling nature is clear enough.

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.

TDQS

A3.8/5.0
Disambiguation5/5

Each tool targets a distinct action or resource: game lifecycle, board queries, move execution, chat/reactions, draw handling, and event waiting. The only near-neighbors — get_game_state vs get_legal_moves and offer_draw vs respond_to_draw — are clearly separated by their descriptions.

Naming Consistency4/5

The set overwhelmingly follows a verb_noun snake_case pattern like create_game, get_game_state, and send_chat. Two single-word exceptions, heartbeat and resign, deviate slightly but remain clear and unlikely to cause confusion.

Tool Count5/5

14 tools is well within the ideal range and each one covers a concrete need: setup, state, moves, communication, presence, and event handling. There are no redundant tools or filler entries.

Completeness5/5

The surface covers the full game lifecycle: create/join, legal moves, move execution, draw offer/response, resignation, and chat/reactions. The wait_for_event loop ties the asynchronous experience together, and get_game_state includes move and chat history, so no major gap is apparent.