Skip to main content
Glama

Wait for email

wait_for_email
Read-onlyIdempotent

Wait until an email arrives in an inbox, then return it with the one time codes and links extracted, so a sign up is two calls: create_inbox, then this. Blocks up to timeout_seconds (default 60, max 120). Returns {message: {id, from, subject, text, codes, links, ...}, codes, links}: codes are 4 to 8 digit OTPs, most likely first; links are https URLs such as verification links. Only messages received after after (default: now) match, so pass the inbox's created_at if the email may already be there. With the catch-all inbox (any address @{code}.runearc.email), pass to with the address you signed up with. Errors: wait_timeout (nothing matched in time: safe to call again, or loosen from/subject_contains), invalid_timeout, not_found (inbox). Next: enter codes[0] or open the verification link.

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": {
      "inbox_id": "<inbox_id>"
    },
    "name": "wait_for_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoOnly match mail sent to this exact address (envelope recipient, To or Cc), such as "signup-42@k7m3qz.runearc.email". Lets several waits share the catch-all inbox.
fromNoOnly match senders whose address contains this, case insensitive, such as "github.com".
afterNoOnly match messages received after this RFC 3339 time, such as the inbox's created_at. Default: when this call starts. Set it when the email may already have arrived.
inbox_idYesInbox id to watch, such as "ibx_01j9...".
timeout_secondsNoSeconds to wait, 1 to 120. Default 60.
subject_containsNoOnly match subjects that contain this, case insensitive, such as "verify".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description layers on blocking semantics (blocks up to timeout_seconds, default 60, max 120), the full return structure, how codes and links are derived and ordered, and named error conditions (wait_timeout, invalid_timeout, not_found). The only tension is that a tool waiting on external mail arrival is arguably open-world while openWorldHint=false, but this is annotation-level rather than a description contradiction.

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 action, the two-call pattern, and the blocking timeout, then return shape, then parameter caveats, then errors, then next step. Dense and purposeful, though the single paragraph runs long and repeats some schema-declared defaults.

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?

No output schema exists, and the description fully covers the return value ({message, codes, links} with field meanings and ordering). Combined with error names and next-step guidance, an agent has everything needed to call this tool and act on the result.

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 100%, so parameter meaning is largely already carried by the schema; the description still adds the important interaction between parameters, namely that `to` is required in spirit when using the shared catch-all inbox and that `after` should be set to the inbox's created_at. Much of the rest restates schema text (defaults, matching rules) rather than extending it.

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 an email arrives in an inbox, then return it with the one time codes and links extracted') plus the concrete output shape. It also positions itself against the sibling create_inbox by naming the two-call signup flow, so an agent can identify it 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?

Gives the exact usage pattern ('a sign up is two calls: create_inbox, then this'), explains when to pass `after` (email may already have arrived), when to pass `to` (catch-all inbox), and gives recovery guidance for wait_timeout ('safe to call again, or loosen from/subject_contains'). Next-step guidance ('enter codes[0] or open the verification link') closes the loop.

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