Skip to main content
Glama

wait_for_mail

Pauses an agent session until new channel activity—mail, obligations, proposals, or replies—arrives, so the agent stays available without ending its turn. Returns pending items and retry on timeout.

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 on a counter that GROWS above what you already had when you called, not on the backlog you were already carrying. That backlog comes back as 'pending_at_entry' so it is not hidden — but it is not a reason to wake: a role with one open round it is deliberately postponing would otherwise be woken instantly, every time, and waiting is broken precisely in the periods when waiting is what you need. Pass ignore_backlog=false for the old behaviour (return 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 in a loop. 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?

No annotations are provided, so the description carries the full burden and meets it: it discloses the wake condition (counter grows above the entry state, not backlog), that backlog is surfaced as pending_at_entry and deliberately not a wake reason, the empty-wait return shape ({timed_out: true, retry: true}), the 50s per-call cap chosen to sit below MCP client timeouts, and the loop-to-wait-longer pattern with 'nothing is lost between calls.'

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?

Front-loaded with the core behaviour before the rationale, and most sentences add real information. The justification for ignoring backlog runs long ('a role with one open round it is deliberately postponing would otherwise be woken instantly, every time...'), which is padding an agent does not strictly need.

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 blocking-wait primitive with no annotations, 0% param coverage, and an output schema, the description supplies the missing safety/mutability context, the return contract, and the retry pattern. Nothing needed to call it correctly is absent.

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 0%, so the description must compensate; it explains ignore_backlog semantics and default clearly, and ties the 50s cap to timeout_s. poll_interval_s is left unexplained, which is a minor gap given its obvious name and the otherwise strong coverage.

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 action (sleep inside the channel) and a specific trigger class (any NEW event: mail, obligation, proposal, resolution), and explicitly distinguishes itself from the sibling wait_for_reply by scope ('this waits for any event'). An agent can choose between the two without opening either schema.

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?

Gives an explicit when: 'Use it when you have finished your own work and want to stay available to the partner instead of ending the turn.' It also names the alternative and the condition that separates them (wait_for_reply = one message; this = any event), and explains the ignore_backlog=false escape hatch for the legacy immediate-return behaviour.

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