Skip to main content
Glama

agmail

Wait for a message

wait_for_message
Read-only

Wait until a message arrives in an inbox (up to 55 seconds) and return it with its text, codes and links. Returns at once if a matching message is already there. Free; needs the inbox id and secret.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoonly a message whose sender contains this text
afterNoonly a message with a sequence number above this (the seq of the last one you saw)
secretYesthe inbox secret returned by create_inbox
timeoutNoseconds to wait for a message
inbox_idYesthe inbox id returned by create_inbox
subject_containsNoonly a message whose subject contains this text

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 only cover the safety profile (readOnly/non-destructive), so the description usefully adds the 55-second cap, immediate return when a message already exists, and that it returns text, codes and links. It also flags the auth need ('needs the inbox id and secret'). It stops short of explaining polling semantics or failure/timeout behavior.

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?

Three tight sentences with no filler, leading with the blocking behavior and the cap before the fallback and auth note. Every sentence carries weight.

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 earns credit by naming the return payload (text, codes, links) and the timing/backoff behavior. The filtering parameters are left entirely to the schema, which is acceptable given 100% coverage, but a note on match semantics would round it out.

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 from/after/timeout/subject_contains semantics are fully documented by the schema. The description only restates the required inbox_id and secret, adding nothing beyond the structured fields; baseline 3 applies.

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?

Specific verb ('Wait until a message arrives') plus the resource (inbox) and what is returned (text, codes, links). It is clearly distinct from sibling read_message/list_messages, which read existing messages rather than block for a new one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It implies the use case (blocking for an incoming message) and notes 'Returns at once if a matching message is already there' and that it is 'Free'. However, it never names the alternatives (read_message, list_messages, get_otp) or states when not to use it, leaving routing to inference.

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