Skip to main content
Glama

wait_for_mail

Read-only

Monitor the shared channel for new actionable items so you can stay available instead of ending your turn. Wakes on fresh arrivals, ignoring the backlog you already have.

Instructions

Sleep inside the channel until something NEW appears for you — new mail, a fresh obligation, a proposal to decide, a ball thrown back at you, a resolution to verify. Use it when you have finished your own work and want to stay available to the partner instead of ending the turn (wait_for_reply waits for a reply to ONE message; this waits for any event). It wakes when an item appears in one of the actionable counters that was not there when you called — even if another item left the same counter meanwhile — and returns those counters as 'pending'. The backlog you already carried is returned as 'pending_at_entry' and does not wake you; ignore_backlog=false returns immediately if anything at all is pending. On an empty wait it returns {timed_out: true, retry: true}. The per-call wait is capped at 50s (below MCP client tool timeouts), so wait longer by calling again. Nothing is lost between calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeout_sNo
ignore_backlogNo
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.8/5.0
Behavior5/5

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

Annotations only provide readOnlyHint=true; the description carries the full burden and does so thoroughly. It discloses the wake condition (new item in actionable counters), the difference between 'pending' and 'pending_at_entry', the immediate return with ignore_backlog=false, the timeout cap at 50s, the retry response, and that nothing is lost between calls. This goes well beyond the annotation and gives the agent a complete mental model.

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 longer than typical but every sentence contributes to purpose, usage, or behavior. It is logically ordered: purpose first, then usage, then wake conditions, then return semantics, then timeout and persistence. There is slight redundancy (e.g., 'sleep' and 'wakes') but no wasted filler. It earns its length given the complexity.

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?

For a tool with 3 parameters and no schema coverage, the description covers almost all needed information: what it does, when to use, wake conditions, return values (though output schema exists), timeout behavior, and retry semantics. The only missing piece is poll_interval_s, but that is a minor tuning parameter. The description is complete enough for an agent to call it correctly without further investigation.

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 description coverage is 0%, so the description must compensate. It explains timeout_s (cap at 50s) and ignore_backlog (behavior when false and its relation to backlog), but poll_interval_s is not described at all. The description covers two of three parameters meaningfully, leaving a gap for the third. Since it adds value beyond the schema for most params, this is a strong 4.

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 clearly states a specific verb ('sleep') and resource ('channel') and enumerates the kinds of events it watches for (new mail, obligation, proposal, etc.). It explicitly contrasts with wait_for_reply, distinguishing it from the nearest sibling. This leaves no ambiguity about what the tool does.

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?

It gives explicit guidance: use it when finished with your own work and want to stay available, instead of ending the turn. It contrasts with wait_for_reply (which waits for a reply to one message) and explains the ignore_backlog=false condition that returns immediately if anything is pending. This provides clear when-to-use and when-not-to-use context.

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