Skip to main content
Glama

Wait for incoming e-mail

wait_for_message
Read-onlyIdempotent

Waits until a new message arrives in the INBOX of a mailbox (e.g. a sign-up confirmation or a one-time code) and returns it. Only messages received after the call starts are returned, unless 'afterMessageId' is passed.

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": {
      "accountId": "<accountId>"
    },
    "name": "wait_for_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountIdYesMailbox id (see 'list_accounts').
fromContainsNoOptional filter: sender address or name contains this text (case-insensitive).
afterMessageIdNoReturn messages with an id greater than this one ('lastMessageId' of a previous call).
timeoutSecondsNoHow long to wait, in seconds. Default: 60.
subjectContainsNoOptional filter: subject contains this text (case-insensitive).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description usefully discloses the blocking nature and the 'only messages after call start' rule, but says nothing about what happens when timeoutSeconds expires (error vs. empty return), which is the single most important behavioral question for a blocking call.

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 sentences, zero filler, with the core wait-and-return behavior front-loaded and the temporal caveat second. Nothing could be removed without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should say more about the return value than 'returns it' — e.g. whether it returns a full message object or an id. Combined with the undisclosed timeout failure mode for a blocking tool, the definition is adequate but leaves real gaps.

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 description coverage is 100%, so the baseline is 3; each parameter including accountId, filters and timeout is already documented in the schema. The description only reinforces afterMessageId semantics that the schema already states, adding little new meaning.

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 verb and resource ('Waits until a new message arrives in the INBOX of a mailbox... and returns it') and pins down the temporal scope ('only messages received after the call starts... unless afterMessageId is passed'). The waiting semantics alone distinguish it from list_messages and read_message in the sibling set.

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?

Gives a concrete usage context ('e.g. a sign-up confirmation or a one-time code') that makes the intended scenario obvious. It stops short of explicit routing advice, e.g. telling the agent to use list_messages instead when the message may already exist, or to use read_message once an id is known.

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