Skip to main content
Glama

wait_for_message

Block until messages arrive for your session, then return them oldest first. Use when idle or expecting a reply; set timeout to 0 to check the inbox.

Instructions

Block until messages for this session arrive, then return them (oldest first). Use it when idle or when expecting a reply; it returns as soon as a message arrives. timeout_s=0 just checks the inbox.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNomax messages to return (default 20)
timeout_sNoseconds to wait (0-600)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses blocking behavior, return ordering (oldest first), early return on arrival, and the timeout_s=0 non-blocking check. It doesn't state the max timeout bound or what happens on expiry (empty return vs. error), which would complete the picture.

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

Conciseness5/5

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

Two tightly packed sentences with zero filler: behavior first, then when to use it, then the edge case. Front-loaded and easy to scan.

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 a simple 2-param, no-annotation, no-output-schema tool, the description covers purpose, blocking semantics, ordering, and the zero-timeout case. Only the timeout expiry behavior and the 0-600 bound are missing.

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 adds value by explaining the semantics of timeout_s=0 beyond the schema's bare 'seconds to wait', clarifying that it degrades to an inbox check. The 'max' parameter is left entirely to the schema.

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 states a specific verb ('Block until... return them') and resource ('messages for this session'), and distinguishes itself from siblings like send_message by describing the blocking receive pattern. An agent can immediately tell this is the receive counterpart to send_message.

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 clear usage contexts ('Use it when idle or when expecting a reply') and explains the timeout_s=0 polling case. It doesn't explicitly name alternatives, but in a send/receive messaging pair the alternative (send_message) is obvious.

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