Skip to main content
Glama

complete_signup_flow

Automates signup verification by creating temporary inboxes, waiting for emails, and extracting confirmation links or OTP codes without human intervention.

Instructions

End-to-end signup helper: create inbox, wait for email, extract link and OTP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
service_nameYes
timeout_secondsNo
poll_interval_secondsNo
subject_containsNo
from_containsNo
preferred_domainsNo
ttl_minutesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • This is the core handler function 'run' that implements the complete_signup_flow tool logic.
    async def run(
        api: ApiClient,
        service_name: str,
        timeout_seconds: int = 90,
        poll_interval_seconds: int = 3,
        subject_contains: str | None = None,
        from_contains: str | None = None,
        preferred_domains: list[str] | None = None,
        ttl_minutes: int | None = None,
    ) -> dict[str, Any]:
        created = await create_signup_inbox.run(
            api=api,
            service_name=service_name,
            ttl_minutes=ttl_minutes,
        )
        if created.get("error"):
            return created
    
        inbox_id = str(created["inbox_id"])
        waited = await wait_for_verification_email.run(
            api=api,
            inbox_id=inbox_id,
            timeout_seconds=timeout_seconds,
            poll_interval_seconds=poll_interval_seconds,
            subject_contains=subject_contains,
            from_contains=from_contains,
        )
    
        if waited.get("status") == "timeout":
            return {
                "status": "timeout",
                "inbox_id": created["inbox_id"],
                "email": created["email"],
                "verification_message": None,
                "verification_link": None,
                "otp_code": None,
            }
    
        if waited.get("error"):
            return waited
    
        message_id = waited.get("message_id")
        if not message_id:
            return tool_error("invalid_response", 502, "Missing message_id after wait_for_verification_email")
    
        try:
            message = await api.read_message(inbox_id, str(message_id))
        except ApiClientError as exc:
            return exc.to_dict()
    
        message_text = str(message.get("body_text") or "")
        if not message_text.strip():
            message_text = str(message.get("body_html") or "")
    
        link_result = await extract_verification_link.run(
            api=api,
            message_text=message_text,
            preferred_domains=preferred_domains,
        )
        otp_result = await extract_otp_code.run(api=api, message_text=message_text)
    
        verification_link = link_result.get("verification_link") if not link_result.get("error") else None
        otp_code = otp_result.get("otp_code") if not otp_result.get("error") else None
    
        if verification_link or otp_code:
            status = "success"
        else:
            status = "partial_success"
    
        return {
            "status": status,
            "inbox_id": created["inbox_id"],
            "email": created["email"],
            "verification_message": {
                "message_id": str(message.get("id") or message_id),
                "subject": message.get("subject"),
                "from_address": message.get("from_address"),
                "received_at": message.get("received_at"),
            },
            "verification_link": verification_link,
            "otp_code": otp_code,
            "link_candidates": link_result.get("candidates", []) if isinstance(link_result, dict) else [],
            "otp_candidates": otp_result.get("candidates", []) if isinstance(otp_result, dict) else [],
        }
  • This is where the 'complete_signup_flow' tool is registered as an MCP tool, acting as a wrapper that handles authentication and calls the 'run' handler logic.
    @mcp.tool(description="End-to-end signup helper: create inbox, wait for email, extract link and OTP.")
    async def complete_signup_flow(
        service_name: str,
        timeout_seconds: int = 90,
        poll_interval_seconds: int = 3,
        subject_contains: str | None = None,
        from_contains: str | None = None,
        preferred_domains: list[str] | None = None,
        ttl_minutes: int | None = None,
    ) -> dict[str, Any]:
        api_key = _get_api_key()
        if not api_key:
            return _unauthorized()
        try:
            async with ApiClient(api_key=api_key) as api:
                return await complete_signup_flow_tool.run(
                    api=api,
                    service_name=service_name,
                    timeout_seconds=timeout_seconds,
                    poll_interval_seconds=poll_interval_seconds,
                    subject_contains=subject_contains,
                    from_contains=from_contains,
                    preferred_domains=preferred_domains,
                    ttl_minutes=ttl_minutes,
                )
        except ApiClientError as exc:
            return exc.to_dict()
        except Exception as exc:  # pragma: no cover
            return _internal_error(exc)
Behavior3/5

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

With no annotations provided, the description carries the full burden and successfully discloses the multi-step internal behavior (inbox creation, polling wait, extraction). However, it omits critical behavioral details like resource lifecycle (whether the inbox persists after completion), failure modes when timeout is reached, or side effects.

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 description is a single, dense sentence that is front-loaded with the value proposition ('End-to-end signup helper'). It avoids fluff, though it borders on under-specification given the high parameter count and complexity.

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 the existence of an output schema (reducing the need for return value documentation), the description is incomplete due to 7 undocumented parameters and lack of guidance relative to sibling tools. For a composite tool with complex filtering and lifecycle options, more context is required.

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?

With 0% schema description coverage across 7 parameters, the description fails to compensate by explaining any parameter semantics. While 'wait for email' loosely implies timeout_seconds and poll_interval_seconds, critical parameters like service_name, ttl_minutes, preferred_domains, and filter fields (subject_contains, from_contains) remain completely undocumented.

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?

The description clearly articulates the composite workflow (create inbox → wait → extract) and positions the tool as an 'end-to-end' solution, effectively distinguishing it from atomic siblings like create_signup_inbox and extract_otp_code. Specific verbs and resources are identified.

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?

The 'end-to-end' framing implicitly contrasts this with the single-purpose sibling tools, suggesting it should be used when full automation is desired. However, there is no explicit guidance on when to use this versus chaining individual tools, or prerequisites for the service_name parameter.

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