wait_for_confirmation
Polls a confirmation ID until the approver responds, returning approved, denied, or pending after create_confirmation. Retries with backoff until timeout so agents can wait for human authorization.
Instructions
Poll a confirmation until the approver responds. Uses exponential backoff (2s initial, 1.5x, 30s max) with jitter.
Agent usage: Call this after create_confirmation with the returned confirmation ID. Terminal states: "approved" (action authorized — check the proof_token), "denied" (action rejected). While "pending", the approver has not yet responded. This poll returns no link — the approval request is delivered to the approver's own channel, and only the owner's "Send again" (POST /api/v1/confirmations/{id}/resend, which no tool calls yet) delivers it there again. If the owner will decide instead, call get_confirmation_approval_link for the owner's approval_url; it needs the confirmation to be still pending — the state this tool waits in — and also refuses once timeout_at has passed, so a long wait can outlive the link even while the status has not moved.
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 |
|---|---|---|---|
| id | Yes | Confirmation ID from create_confirmation | |
| 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 | MongoDB ObjectId | |
| status | No | "pending" when the wait ran out before a terminal state; otherwise the resource's own status | |
| hitl_id | No | ||
| message | No | On timeout: what to do next (call the tool again with the same identifier) | |
| resends | No | Every "Send again" (`POST /confirmations/{id}/resend`), oldest first, the last 50 kept. Absent from an API that predates it. | |
| response | No | The decision and its evidence (null while pending) | |
| created_at | No | ||
| timeout_at | No | When this confirmation will time out | |
| updated_at | No | ||
| last_status | No | On timeout: the last non-terminal status observed, or null when none was | |
| proof_token | No | Signed proof of the decision, approval or denial alike, naming who decided (`decided_by`, plus `authorization_id` for an approver); null while pending and for a system denial (`response.channel` is `system`) | |
| resolved_at | No | ||
| waited_seconds | No | On timeout: seconds actually waited | |
| timeout_seconds | No | On timeout: the wait budget this call was given |