Skip to main content
Glama

Wait for email

wait_for_email

Wait until a new email arrives in the mailbox (long-poll), then return it like read_email, including extracted codes and links. Returns {"timed_out": true} if nothing matching arrives in time; just call it again. By default only emails received after this call started count (or since the mailbox was created, if that was under 2 minutes ago); pass "after" (an email id or ISO time) to include earlier ones or skip ones you handled.

Input Schema

NameRequiredDescriptionDefault
afterNoOnly emails received after this email id (eml_…) or ISO 8601 time. Default: when this call started, or when the mailbox was created if that was under 2 minutes ago.
mailboxYesMailbox id (mbx_…) or full email address.
from_containsNoCase-insensitive substring the sender name or address must contain.
timeout_secondsNoHow long to wait (default 30, max 120).
subject_containsNoCase-insensitive substring the subject must contain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Discloses non-obvious behavior the annotations do not: the {"timed_out": true} return shape, the retry pattern, and the default lower-bound rule (call start, or mailbox creation if under 2 minutes ago) that governs which emails count. It does not reconcile the odd readOnlyHint=false annotation for what reads like a non-mutating wait, leaving a small ambiguity about side effects.

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-loads the core behavior, then the failure mode and retry advice, then the filtering caveat — every sentence carries information. The nested parenthetical about the 2-minute mailbox-creation rule is slightly dense but justified by non-obvious default semantics.

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?

With no output schema, the description still explains the return value (email like read_email plus extracted codes and links) and the timeout case, and the schema covers all parameters. An agent has everything needed to call it, interpret the result, and retry correctly.

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 all five parameters are already documented with defaults and bounds. The description restates the 'after' semantics and the default time window, adding narrative context but no syntax or format detail beyond 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?

States a specific verb and resource ('Wait until a new email arrives in the mailbox (long-poll)') plus the return contract ('return it like read_email, including extracted codes and links'). An agent can distinguish this from read_email and list_emails immediately: it blocks until arrival rather than reading what already exists.

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 clear operational context: it long-polls, returns a timed-out sentinel, and should simply be called again on timeout, plus guidance on when to pass 'after' to include earlier mail or skip already-handled messages. It does not explicitly say when to prefer read_email or list_emails instead, so routing is inferred rather than stated.

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