Skip to main content
Glama

wait_for_email

Read-onlyIdempotent

Block until the email inbox receives a message, then return new messages with extracted one-time codes and links (verification links first). Pass after (the last message ID seen) to wait for newer ones. Returns timedOut: true after timeoutSeconds (default 25, max 30); call again to keep waiting. For filtered waits, take a checkpoint before triggering mail, then pass nextCursor back with the same filters.

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

Input Schema

NameRequiredDescriptionDefault
idYesResource UUID.
fromNoExact sender mailbox, case insensitive.
readNo
textNoLiteral case insensitive plain text match.
afterNoOptional message ID; only newer messages are returned.
labelNoExact label, case insensitive.
limitNo
tokenNoManagement or inspection token for anonymous resources. Omit for resources owned by your authenticated workspace.
cursorNoCursor for this inbox and the same filters.
hasCodeNo
hasLinkNo
subjectNoLiteral case insensitive subject match.
mailFromNoExact envelope sender mailbox, case insensitive.
checkpointNoReturn a cursor for mail arriving after this call.
hasAttachmentNo
timeoutSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • addedInput schema / properties / checkpoint
      Added value: +{
      +  "description": "Return a cursor for mail arriving after this call.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Cursor for this inbox and the same filters.",
      +  "type": "string"
      +}
    • addedInput schema / properties / from
      Added value: +{
      +  "description": "Exact sender mailbox, case insensitive.",
      +  "type": "string"
      +}
    • addedInput schema / properties / hasAttachment
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / hasCode
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / hasLink
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / label
      Added value: +{
      +  "description": "Exact label, case insensitive.",
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "maximum": 50,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / mailFrom
      Added value: +{
      +  "description": "Exact envelope sender mailbox, case insensitive.",
      +  "type": "string"
      +}
    • addedInput schema / properties / read
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / subject
      Added value: +{
      +  "description": "Literal case insensitive subject match.",
      +  "type": "string"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Literal case insensitive plain text match.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations by disclosing blocking semantics, the default and maximum timeout (25s / 30s), the timedOut flag, and the retry loop needed to keep waiting. The checkpoint-then-wait pattern for filtered waits is exactly the kind of workflow context annotations cannot convey.

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 purpose and return behavior, and every sentence carries information. Some clauses are densely compressed (the filtered-waits sentence requires unpacking), which slightly taxes first-read comprehension.

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 correctly carries the burden of describing results: message contents, extracted codes and links, verification-link ordering, and the timedOut signal. Combined with the timeout and checkpoint guidance, an agent has everything needed to call and re-call it correctly.

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?

With 63% schema coverage across 16 params, the description adds real meaning for `after` (last message ID seen), `timeoutSeconds` (default 25, max 30), and `checkpoint`/cursor handling. Minor deduction: it refers to 'nextCursor' while the actual parameter is named `cursor`, which could briefly confuse an agent, and the boolean filters (hasCode, hasLink, hasAttachment, read) are left to 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 ('Block until the email inbox receives a message') and describes the return payload (new messages, extracted one-time codes and links, verification links first). An agent can tell this apart from wait_for_sms or wait_for_webhook purely from the description without opening the schema.

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 concrete operational guidance: pass `after` to wait for newer messages, call again after timedOut to keep waiting, and take a checkpoint before triggering mail for filtered waits. It lacks explicit when-not-to-use guidance or named alternatives for the other wait_* tools, so it stops short of a 5.

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.