Skip to main content
Glama

wait_for_reply

Block-poll an inbox for an unseen reply to a message_id, returning the reply or a timeout flag; late replies stay unread and are returned by the next poll.

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, and — if you pass 'after_id' — newer than that id. Without this the call returned the oldest reply forever: three calls in a row handed back the same message, marked read half an hour earlier, and a wait that keeps returning the same answer is not a wait. Pass after_id= when you are looping without marking things read. The per-call wait is capped at 50s (below MCP client tool timeouts, see MCP_TOOL_TIMEOUT), so wait longer by simply calling again in a loop until you get the reply or decide to move on.

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

A3.8/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does most of it: it discloses the 50s per-call cap relative to MCP client timeouts, that timeouts are non-destructive (reply stays in DB and unread), the exact timeout return value, and that already-read/or older-than-after_id messages are excluded. It implies state changes (messages get marked read) rather than stating the exact side effects, which keeps it short of 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.

Conciseness3/5

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

The core behavior and the after_id rule are front-loaded, which is good, but the middle is bloated by a verbose war-story ('three calls in a row handed back the same message, marked read half an hour earlier') that restates the same failure mode twice. Several sentences could be compressed without losing information.

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?

It covers the blocking/timeout model, cursor semantics, and loop guidance, and because an output schema exists the description needn't detail the reply payload — yet it still names the timeout return shape. The only real omission is the role of include_read, which matters for whether already-read replies are eligible.

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 coverage is 0% across 5 parameters, so the schema alone leaves almost everything unexplained. The description adds real meaning for after_id (cursor semantics), timeout_s (the 50s cap), and message_id, but says nothing about include_read or poll_interval_s, leaving two parameters undocumented anywhere.

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

Purpose4/5

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

The description states a specific verb+resource: 'Block-poll the inbox for a reply to a given message_id that you have NOT seen yet', which is unmistakably more precise than the bare name. It is clear about scope and return shape, but never names or contrasts with the sibling wait_for_mail, so sibling differentiation is left to inference.

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 gives concrete guidance on when to pass after_id ('when you are looping without marking things read') and how to wait longer than the cap ('call again in a loop until you get the reply'). It stops short of explicitly excluding or naming the alternative wait_for_mail, so it is strong context without a full when/when-not/alternative triad.

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