Skip to main content
Glama

Wait for a matching email

wait_for_email
Read-onlyIdempotent

Wait up to 25 seconds for an email sent to an exact recipient, with optional exact sender, subject substring, and RFC3339 lower-bound filters. Returns the first matching email with its body. Useful for deterministic OTP, magic-link, and signup tests.

Input Schema

NameRequiredDescriptionDefault
sinceNoOptional RFC3339 timestamp; ignore older emails
senderNoOptional exact envelope sender
recipientYesExact recipient email address
subdomain_idYesSubdomain ID
timeout_secondsNoHow long to wait, in seconds
subject_containsNoOptional case-insensitive subject substring

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so safety is covered. The description adds genuinely new behavior: a 25-second ceiling, first-match-only semantics, and that the email body is returned. It does not say what happens when the timeout expires with no match (error vs. empty), which is the one remaining behavioral gap.

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 tight sentences, front-loaded with the wait/matching scope before the use case. No filler and nothing repeated needlessly.

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?

With no output schema, the description steps in by describing the return value ('first matching email with its body'), and all six parameters are covered. Only the no-match/timeout outcome is left unspecified, a minor gap for a 6-param blocking tool.

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% and the schema already documents each filter's matching mode, so the description mostly restates it (exact recipient, exact sender, substring, lower bound). It consolidates the matching semantics in one place but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Wait ... for an email'), specifies the matching scope (exact recipient, optional exact sender, subject substring, RFC3339 lower bound), and states the return ('first matching email with its body'). It implicitly separates itself from read_email/list_emails by being a blocking wait, but it never names a sibling to make the distinction explicit.

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?

It gives a clear when-to-use context ('deterministic OTP, magic-link, and signup tests'), which tells the agent the intended scenario. It stops short of naming alternatives or stating exclusions, so an agent must infer that read_email/list_emails are the non-blocking options.

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