Skip to main content
Glama

wait_for_confirmation

Read-only

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. 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": {
      "id": "<id>"
    },
    "name": "wait_for_confirmation"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesConfirmation ID from create_confirmation
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
idNoMongoDB ObjectId
statusNo"pending" when the wait ran out before a terminal state; otherwise the resource's own status
hitl_idNo
messageNoOn timeout: what to do next (call the tool again with the same identifier)
resendsNoEvery "Send again" (`POST /confirmations/{id}/resend`), oldest first, the last 50 kept. Absent from an API that predates it.
responseNoThe decision and its evidence (null while pending)
created_atNo
timeout_atNoWhen this confirmation will time out
updated_atNo
last_statusNoOn timeout: the last non-terminal status observed, or null when none was
proof_tokenNoSigned 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_atNo
waited_secondsNoOn timeout: seconds actually waited
timeout_secondsNoOn timeout: the wait budget this call was given

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": {
      +    "created_at": {},
      +    "hitl_id": {},
      +    "id": {
      +      "description": "MongoDB ObjectId"
      +    },
      +    "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)"
      +    },
      +    "proof_token": {
      +      "description": "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`)"
      +    },
      +    "resends": {
      +      "description": "Every \"Send again\" (`POST /confirmations/{id}/resend`), oldest first, the last 50 kept. Absent from an API that predates it."
      +    },
      +    "resolved_at": {},
      +    "response": {
      +      "description": "The decision and its evidence (null while pending)"
      +    },
      +    "status": {
      +      "description": "\"pending\" when the wait ran out before a terminal state; otherwise the resource's own status"
      +    },
      +    "timeout_at": {
      +      "description": "When this confirmation will time out"
      +    },
      +    "timeout_seconds": {
      +      "description": "On timeout: the wait budget this call was given"
      +    },
      +    "updated_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?

With readOnlyHint=true already declaring safety, the description still adds substantial behavioral detail: backoff shape (2s initial, 1.5x, 30s max, jitter), the set of terminal states and what each means, and the non-obvious fact that this poll returns no delivery link and that no tool currently invokes the resend endpoint. It also discloses the timeout_at interaction that lets a long wait outlive the approval link.

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-loaded with the core action and backoff, then a clearly labelled agent-usage block and an access block. The dependency sentence about the resend endpoint and the approval-link/`timeout_at` caveat is dense and runs long, costing some readability, but every sentence carries operational information.

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?

Covers the full loop an agent needs: auth prerequisites (with the note that start_login does not help), entry condition from create_confirmation, timeout behavior relative to the MCP client's request timeout, and the retry path. An output schema exists, so return-value detail is correctly omitted.

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%, so the baseline is 3; the description goes beyond by explaining what a pending return means for the caller and by tying the confirmation's lifecycle state to which follow-up tools will still accept it. It does not add format or sourcing detail for the `id` parameter itself, which the schema already covers.

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?

Opens with a specific verb+resource ("Poll a confirmation") and immediately names the terminal condition ("until the approver responds"). It is clearly separable from siblings like get_confirmation (one-shot read) and get_confirmation_approval_link (fetching the owner link).

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 entry condition ("Call this after create_confirmation with the returned confirmation ID"), an explicit alternative for a different actor (get_confirmation_approval_link for the owner's approval_url), and explicit guidance on the pending case ("call it again with the same identifier"). The branching between owner-driven and approver-driven flows is spelled out rather than left to inference.

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.