Skip to main content
Glama

wait_for_reply

Read-only

Block-poll your inbox until a reply to a specific message arrives, returning the new reply or a timeout signal. Retry safely on timeout—late replies are preserved and returned on the next call.

Instructions

Block-poll the inbox for a reply to a given message_id that you have NOT seen yet. Returns the reply message, or {timed_out: true, retry: true} when none arrived — nothing is lost on timeout: a late reply stays in the DB and in unread, and the NEXT wait_for_reply call returns it immediately. 'Not seen yet' means: not already marked read by you (include_read=true drops that condition), and — if you pass 'after_id' — newer than that id; pass after_id= when looping without marking things read. A message_id that does not exist is refused. The per-call wait is capped at 50s (below MCP client tool timeouts), so wait longer by calling again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
after_idNo
timeout_sNo
message_idYes
include_readNo
poll_interval_sNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say readOnlyHint=true, and the description adds substantial context: timeout return shape, no-message-loss guarantee, late-reply persistence, nonexistent-id refusal, and the 50s cap. No contradiction with annotations.

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?

Every sentence earns its place, covering purpose, timeout semantics, filtering logic, refusal behavior, and the wait cap. It is dense but not bloated, with a slightly run-on structure toward the end.

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?

Covers edge cases and operational details: timeout retry semantics, no data loss, after_id loop pattern, include_read behavior, nonexistent message refusal, and the 50s MCP-timeout-aware cap. An agent can invoke and loop correctly without external info.

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 has 0% description coverage, and the description compensates for most params: message_id, after_id, include_read, and timeout_s behavior. poll_interval_s is only covered by its title, but is inferable from the name and default.

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-poll the inbox for a reply to a given message_id that you have NOT seen yet.' This clearly differentiates it from list/read siblings by emphasizing blocking behavior and the unread filter.

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 clear usage context and looping guidance: 'pass after_id=<the last reply you handled> when looping without marking things read' and explains include_read. It does not explicitly name alternatives, but the unique polling behavior makes the use case unmistakable.

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