Skip to main content
Glama

wait_for_verification_email

Monitor a temporary email inbox for verification messages with configurable filters and timeout, enabling automated email confirmation workflows.

Instructions

Wait until a verification email arrives or timeout is reached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYes
timeout_secondsNo
poll_interval_secondsNo
subject_containsNo
from_containsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core implementation of the 'wait_for_verification_email' tool, which polls an inbox for messages matching optional subject or sender filters.
    async def run(
        api: ApiClient,
        inbox_id: str,
        timeout_seconds: int = 90,
        poll_interval_seconds: int = 3,
        subject_contains: str | None = None,
        from_contains: str | None = None,
    ) -> dict[str, Any]:
        if not inbox_id:
            return tool_error("validation_error", 400, "inbox_id is required")
        if timeout_seconds < 1:
            return tool_error("validation_error", 400, "timeout_seconds must be >= 1")
        if poll_interval_seconds < 1:
            return tool_error("validation_error", 400, "poll_interval_seconds must be >= 1")
    
        deadline = monotonic() + timeout_seconds
        subject_filter = subject_contains.lower() if subject_contains else None
        from_filter = from_contains.lower() if from_contains else None
    
        while monotonic() < deadline:
            try:
                messages = await api.list_messages(inbox_id, limit=20, offset=0)
            except ApiClientError as exc:
                return exc.to_dict()
    
            for message in messages:
                subject = str(message.get("subject") or "")
                from_address = str(message.get("from_address") or "")
    
                if subject_filter and subject_filter not in subject.lower():
                    continue
                if from_filter and from_filter not in from_address.lower():
                    continue
    
                return {
                    "status": "received",
                    "message_id": message.get("id"),
                    "received_at": message.get("received_at"),
                    "subject": subject,
                    "from_address": from_address,
                    "timeout_seconds": timeout_seconds,
                }
    
            remaining = deadline - monotonic()
            if remaining > 0:
                await asyncio.sleep(min(poll_interval_seconds, max(0.1, remaining)))
    
        return {
            "status": "timeout",
            "timeout_seconds": timeout_seconds,
        }
Behavior2/5

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

With no annotations provided, the description carries full burden but only minimally discloses behavior. While it mentions 'wait' and 'timeout', it fails to explain the polling mechanism, default intervals, what constitutes a 'verification' email match, or failure modes when timeout is reached.

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?

The single sentence is efficient and front-loaded with the key action, containing no wasted words. However, it is overly terse given the complexity of the tool and lack of supporting documentation elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description is incomplete for a 5-parameter polling tool with zero schema coverage. It omits critical context about the polling behavior, filtering logic, and integration with the verification workflow implied by sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, requiring the description to compensate for all 5 parameters. It implicitly references 'timeout_seconds' via 'timeout is reached' and 'inbox_id' via context, but provides no explanation for 'poll_interval_seconds', 'subject_contains', or 'from_contains' filtering capabilities.

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

Purpose3/5

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

The description states the core action (waiting for a verification email) and mentions the timeout mechanism, but fails to differentiate from sibling 'get_latest_email' or clarify its role in the signup flow alongside 'create_signup_inbox' and 'extract_otp_code'.

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

Usage Guidelines2/5

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

No guidance provided on when to use this polling/waiting tool versus simply retrieving existing emails with 'get_latest_email', or how it relates to the extraction tools. No prerequisites or conditions mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/francofuji/un-correo-temporal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server