wait_for_2fa
Poll a 2FA session until the user completes the challenge. Returns a verified or expired status so the agent knows whether to proceed with the protected operation or restart.
Instructions
Poll a 2FA session until the user completes the challenge. Uses exponential backoff (2s initial, 1.5x, 30s max) with jitter.
Agent usage: Call this after start_2fa with the returned session_id. Terminal states: "verified" (challenge completed — proceed with the protected operation), "expired" (offer to restart with start_2fa). Before polling, present start_2fa's challenge: pass its deep_link to render_auth_link on telegram/whatsapp, or show its sms_message on sms.
The user does not see tool results — most clients fold them away, render_auth_link's output included. Before you wait or poll, put what the user must act on into your own reply text: the link itself (not a sentence announcing it), the SMS text and number, or a note to check their inbox.
ACCESS: needs a Proof account. Set PROOF_API_KEY and restart this server, then call this tool again. start_login does NOT open this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | 2FA session ID from start_2fa | |
| 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 |
|---|---|---|---|
| status | No | "pending" when the wait ran out before a terminal state; otherwise the resource's own status | |
| message | No | On timeout: what to do next (call the tool again with the same identifier) | |
| session_id | No | ||
| action_type | No | The action the session was started for: one of `TwoFAActionType` for sessions started through this API; admin-console sessions carry internal values. | |
| last_status | No | On timeout: the last non-terminal status observed, or null when none was | |
| verified_at | No | ||
| waited_seconds | No | On timeout: seconds actually waited | |
| timeout_seconds | No | On timeout: the wait budget this call was given | |
| grant_expires_at | No | When the grant this step-up stored stops being accepted | |
| grant_single_use | No | Whether the grant is spent by the first act it allows |