Skip to main content
Glama

wait_for_2fa

Read-only

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. Authenticate this client (Claude Code: /mcp → Authenticate), then call this tool again. start_login does NOT open this tool.

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": {
      "session_id": "<session_id>"
    },
    "name": "wait_for_2fa"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes2FA session ID from start_2fa
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
statusNo"pending" when the wait ran out before a terminal state; otherwise the resource's own status
messageNoOn timeout: what to do next (call the tool again with the same identifier)
session_idNo
action_typeNoThe action the session was started for: one of `TwoFAActionType` for sessions started through this API; admin-console sessions carry internal values.
last_statusNoOn timeout: the last non-terminal status observed, or null when none was
verified_atNo
waited_secondsNoOn timeout: seconds actually waited
timeout_secondsNoOn timeout: the wait budget this call was given
grant_expires_atNoWhen the grant this step-up stored stops being accepted
grant_single_useNoWhether the grant is spent by the first act it allows

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "action_type": {
      +      "description": "The action the session was started for: one of `TwoFAActionType` for sessions started through this API; admin-console sessions carry internal values."
      +    },
      +    "grant_expires_at": {
      +      "description": "When the grant this step-up stored stops being accepted"
      +    },
      +    "grant_single_use": {
      +      "description": "Whether the grant is spent by the first act it allows"
      +    },
      +    "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)"
      +    },
      +    "session_id": {},
      +    "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"
      +    },
      +    "verified_at": {},
      +    "waited_seconds": {
      +      "description": "On timeout: seconds actually waited"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond readOnlyHint=true: discloses the backoff curve (2s/1.5x/30s max with jitter), that a timeout returns status "pending" and should be re-polled, the client-request-timeout interaction with timeout_seconds, the Proof-account auth requirement, and the critical fact that users do not see tool results. No contradiction with annotations.

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?

Front-loads the core behavior in one sentence, then segments agent guidance, terminal states, rendering instructions, and access. Every section carries operational value, though the rendering and ACCESS paragraphs are slightly long relative to the tool's single polling action.

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?

With an output schema present, the description nonetheless covers the full lifecycle an agent needs: prerequisite, presentation of the challenge, polling limits, terminal states, retry semantics, and auth setup. Nothing required 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 already 100%, and the description reinforces it rather than duplicating: session_id is bound to start_2fa's output, and timeout_seconds' failure mode (answers "pending", call again) is explained in context. It doesn't add syntax beyond schema, so a 4 rather than 5.

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?

States a specific verb and resource — poll a 2FA session until the user completes the challenge — and names the backoff parameters. It also distinguishes itself from start_2fa (which creates the session) and implicitly from one-shot status checks, so an agent can tell what this tool is for without opening the 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?

Gives an explicit precondition ('Call this after start_2fa with the returned session_id'), preconditions for presenting the challenge before polling, and per-terminal-state actions: proceed on "verified", offer start_2fa on "expired". This is when/when-not guidance with named alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.