Skip to main content
Glama

Apumail — Email & SMS for AI Agents

wait_for_mail

Long-poll for a new mail. Returns immediately if a mail with id > since already exists, otherwise blocks up to timeout seconds. Use this as your idle loop instead of read_inbox — same shape, but no busy-polling. Standard pattern: pass next_since from the previous call as since.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "address": "<address>",
      "token": "<token>"
    },
    "name": "wait_for_mail"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinceNoReturn mails with id > this. Default 0 (any).
tokenYesThe inbox token from create_inbox.
addressYesThe inbox address (e.g. merry-llama-abcd@apumail.com).
timeoutNoMax seconds to block (1-300). Default 60.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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 full burden and does disclose the key non-obvious trait: the call may block up to `timeout` seconds or return immediately if a matching mail already exists. That blocking latency is the behavior an agent most needs to know before placing this in a loop. It stops short of saying what is returned when the timeout expires with no new mail, or whether the token can expire mid-poll.

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?

Three sentences, each earning its place: the first defines the operation and its two return paths, the second routes against the sibling, the third gives the loop pattern. The blocking behavior is front-loaded before the alternative is mentioned.

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?

There is no output schema, and the phrase 'same shape' only indirectly signals that results mirror read_inbox; the empty-timeout return case is left unstated. Everything else an agent needs to invoke this correctly — blocking window, cursor source, required auth inputs — is covered.

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 100%, so the schema already defines `since`, `timeout`, `address`, and `token` with defaults and ranges; that establishes the baseline of 3. The description adds one genuinely new semantic — that `since` should be fed from the previous call's `next_since` — which is cursor-chaining behavior not derivable from the schema, but this is a single addition rather than a systematic explanation of parameters.

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 opens with a specific verb and resource ('Long-poll for a new mail') and immediately differentiates itself from the sibling read_inbox by describing the blocking semantics. An agent can distinguish this from read_inbox, wait_for_sms, and read_archived without opening any 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?

It states the intended usage context explicitly ('use this as your idle loop instead of read_inbox'), names the alternative it replaces, and gives the reason ('no busy-polling'). It also supplies the concrete calling pattern ('pass `next_since` from the previous call as `since`'), which is exactly the guidance an agent needs to drive repeated calls.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources