wait_for_login
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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Auth session ID from start_login | |
| timeout_seconds | No | Maximum 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
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| type | No | ||
| status | No | "pending" when the wait ran out before a terminal state; otherwise the resource's own status | |
| channel | No | Authentication channel | |
| message | No | On timeout: what to do next (call the tool again with the same identifier) | |
| qr_code | No | Base64-encoded QR code image | |
| qr_text | No | UTF-8 text representation of the QR code for terminal/agent display | |
| user_id | No | ||
| deep_link | No | ||
| created_at | No | When the session was started. Sent by the poll. | |
| expires_at | No | ||
| last_status | No | On timeout: the last non-terminal status observed, or null when none was | |
| verified_at | No | ||
| instructions | No | ||
| fallback_code | No | Telegram and WhatsApp sign-ins: the code to send the bot by hand when the deep link does not open. | |
| waited_seconds | No | On timeout: seconds actually waited | |
| timeout_seconds | No | On timeout: the wait budget this call was given | |
| fallback_message | No | Telegram and WhatsApp sign-ins: the whole message to send the bot by hand, the code included. |