Skip to main content
Glama
@proof-holdings/mcp-server

@proof-holdings/mcp-server

Official

wait_for_login

Read-only

Poll a login session until the user completes authentication. Uses exponential backoff (2s initial, 1.5x, 30s max) with jitter.

Instructions

Poll a login session until the user completes authentication. Uses exponential backoff (2s initial, 1.5x, 30s max) with jitter.

Agent usage: Call this after start_login with the returned session ID. Terminal states: "verified" (login succeeded — this server keeps the session for this connection and signs your own account records with it: emails, phones, domains, API keys, 2FA, DNS credentials, verification requests, your Public page's username and proof list), "failed", "expired", "completed_elsewhere" (email only: the user pressed "Sign in here" on the email link's page, so the browser they clicked from is signed in and this connection never will be — tell them so, and start a new login if this connection still needs one), "account_access_off" (WhatsApp, Telegram or SMS only: the number signs in to an account that turned its Account access off, so nobody is signed in and no account is created — tell the user to sign in with an email or phone that has account access). A result with status "pending" means the wait ran out before the user finished — call this tool again with the same id.

Before calling this for a challenge you created, make sure your reply text already shows the user what to act on — the link itself, the SMS text and number, or a note to check their inbox; a link that appeared only in a tool result is one they never saw.

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_login"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesAuth session ID from start_login
timeout_secondsNoMaximum wait time in seconds (default: 50, max: 600). Keep it under your MCP client's request timeout (the SDK default is 60 s) — a longer wait is cut off by the client while the server is still polling. On timeout the tool answers status "pending"; call it again with the same identifier.

Output Schema

NameRequiredDescriptionDefault
idNo
typeNo
statusNo"pending" when the wait ran out before a terminal state; otherwise the resource's own status
channelNoAuthentication channel
messageNoOn timeout: what to do next (call the tool again with the same identifier)
qr_codeNoBase64-encoded QR code image
qr_textNoUTF-8 text representation of the QR code for terminal/agent display
user_idNo
deep_linkNo
created_atNoWhen the session was started. Sent by the poll.
expires_atNo
last_statusNoOn timeout: the last non-terminal status observed, or null when none was
verified_atNo
instructionsNo
fallback_codeNoTelegram and WhatsApp sign-ins: the code to send the bot by hand when the deep link does not open.
waited_secondsNoOn timeout: seconds actually waited
timeout_secondsNoOn timeout: the wait budget this call was given
fallback_messageNoTelegram and WhatsApp sign-ins: the whole message to send the bot by hand, the code included.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.12.0
    • addedOutput schema / properties / created_at
      Added value: +{
      +  "description": "When the session was started. Sent by the poll."
      +}
    • addedOutput schema / properties / fallback_code
      Added value: +{
      +  "description": "Telegram and WhatsApp sign-ins: the code to send the bot by hand when the deep link does not open."
      +}
    • addedOutput schema / properties / fallback_message
      Added value: +{
      +  "description": "Telegram and WhatsApp sign-ins: the whole message to send the bot by hand, the code included."
      +}
  2. Changed2 schema fields changedv1.7.2
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "channel": {
      +      "description": "Authentication channel"
      +    },
      +    "deep_link": {},
      +    "expires_at": {},
      +    "id": {},
      +    "instructions": {},
      +    "last_status": {
      +      "description": "On timeout: the last non-terminal status observed, or null when none was"
      +    },
      +    "message": {
      +      "description": "On timeout: what to do next (call the tool again with the same identifier)"
      +    },
      +    "qr_code": {
      +      "description": "Base64-encoded QR code image"
      +    },
      +    "qr_text": {
      +      "description": "UTF-8 text representation of the QR code for terminal/agent display"
      +    },
      +    "status": {
      +      "description": "\"pending\" when the wait ran out before a terminal state; otherwise the resource's own status"
      +    },
      +    "timeout_seconds": {
      +      "description": "On timeout: the wait budget this call was given"
      +    },
      +    "type": {},
      +    "user_id": {},
      +    "verified_at": {},
      +    "waited_seconds": {
      +      "description": "On timeout: seconds actually waited"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observedv1.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true; the description goes well beyond that with backoff parameters (2s, 1.5x, 30s max, jitter), session persistence semantics (the session is kept for this connection and signs the caller's account records), and a full enumeration of terminal states with their meanings. The one wrinkle is that signing account records is a real side effect, which sits in mild tension with readOnlyHint, though the tool itself only reads; that ambiguity slightly caps the score.

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?

Purpose and cadence are front-loaded in the first two sentences, and the state list is dense with actionable content rather than filler. Some parenthetical clauses (e.g., "so nobody is signed in and no account is created") could be trimmed, and the long compound sentence is heavy, but nothing is gratuitous.

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?

An output schema exists, yet the description still spells out every terminal status and the agent's required follow-up for each, plus the client-timeout failure mode and the UX precondition about surfacing links. For a long-polling flow tool with branching outcomes, nothing an agent needs in order to call it correctly is missing.

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%, including the timeout_seconds client-timeout warning, so the baseline is 3. The description adds meaning beyond the schema by explaining that a "pending" result means the wait elapsed and the same id must be reused, which directly informs how timeout_seconds should be chosen across repeated calls.

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 opening sentence gives a specific verb and resource ("Poll a login session until the user completes authentication") plus the backoff mechanics. It also anchors itself against the sibling start_login ("Call this after start_login with the returned session ID"), so an agent can place it in the login flow without opening another 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?

Explicit sequencing (call after start_login), explicit retry rule (on "pending", call again with the same id), explicit per-terminal-state instructions on what to tell the user, and a pre-call prerequisite that the reply text must already surface the link/SMS before polling. That is when-to-use, when-to-call-again, and a hard precondition all in one.

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

Deploy Server

Other Tools