Skip to main content
Glama

Wait for User Answer

wait_for_answer
Read-onlyIdempotent

Read the answer or current state of an existing question from ask_user or send_notification. Waits up to timeoutMs, capped at 55 seconds. Returns answered, the answer when available, status and handoff information. Only pending is a live unanswered question; cancelled, expired, missing and unavailable are terminal states. Does not send another question.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutMsNoHow long this one poll blocks, in milliseconds (default 30000, max 55000). Follow handoffAction when present, otherwise nextAction.
correlationIdYesThe correlationId from an earlier ask_user response, or the linkedCorrelationId from a send_notification with an embedded askQuestion

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNoWhat to do next, when there is a next step.
noteNoFree text the user added alongside their answer.
valueNoThe user's answer: "yes" or "no" for confirm, the chosen option for select, the typed text for input. Present only when answered is true.
statusYesThe actual question state. Only pending is a live unanswered wait.
answeredYesTrue once the user responded. False means follow handoffAction when present, otherwise nextAction; do not guess that every unanswered state is a timeout.
nextActionNoBackward-compatible next step for older clients. Follow handoffAction first when present.
answerSourceNoRecorded answering surface, when known. Missing provenance is not proof of a phone answer; sandbox is simulated.
handoffActionNoRace-safe directive for updated clients. Takes precedence over nextAction.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / answerSource
      Added value: +{
      +  "description": "Recorded answering surface, when known. Missing provenance is not proof of a phone answer; sandbox is simulated.",
      +  "enum": [
      +    "dashboard",
      +    "mobile_app",
      +    "mobile_background",
      +    "decide_page",
      +    "live_page",
      +    "answer_link",
      +    "inbox",
      +    "slack",
      +    "mac_app",
      +    "sandbox"
      +  ],
      +  "type": "string"
      +}
  2. Changed7 schema fields changed
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"How long this call blocks, in milliseconds (default 30000, max 55000). Retry with the same correlationId to keep waiting; the question expires 10 minutes after it was asked."New value: +"How long this one poll blocks, in milliseconds (default 30000, max 55000). Follow handoffAction when present, otherwise nextAction."
    • changedOutput schema / properties / answered / description
      Previous value: -"True once the user responded. False means keep polling with the same correlationId, up to 3 times at timeoutMs 55000; it is a timeout on this call, not a refusal."New value: +"True once the user responded. False means follow handoffAction when present, otherwise nextAction; do not guess that every unanswered state is a timeout."
    • addedOutput schema / properties / handoffAction
      Added value: +{
      +  "description": "Race-safe directive for updated clients. Takes precedence over nextAction.",
      +  "enum": [
      +    "cancel_then_ask_in_current_client",
      +    "stop"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / hint
      Added value: +{
      +  "description": "What to do next, when there is a next step.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / nextAction
      Added value: +{
      +  "description": "Backward-compatible next step for older clients. Follow handoffAction first when present.",
      +  "enum": [
      +    "wait_for_answer",
      +    "ask_in_current_client"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "description": "The actual question state. Only pending is a live unanswered wait.",
      +  "enum": [
      +    "answered",
      +    "pending",
      +    "cancelled",
      +    "expired",
      +    "missing",
      +    "unavailable"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "answered"
      -]New value: +[
      +  "answered",
      +  "status"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "answered": {
      +      "description": "True once the user responded. False means keep polling with the same correlationId, up to 3 times at timeoutMs 55000; it is a timeout on this call, not a refusal.",
      +      "type": "boolean"
      +    },
      +    "note": {
      +      "description": "Free text the user added alongside their answer.",
      +      "type": "string"
      +    },
      +    "value": {
      +      "description": "The user's answer: \"yes\" or \"no\" for confirm, the chosen option for select, the typed text for input. Present only when answered is true.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "answered"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world. The description adds real value beyond them: the wait is capped at 55 seconds, 'pending' is the only live state, and cancelled/expired/missing/unavailable are terminal, which tells the agent how to interpret results and whether to keep polling.

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 tightly written; the state taxonomy is the most valuable part. The trailing return-value sentence slightly overlaps the output schema but is brief.

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 annotations covering the safety profile and an output schema covering the return values, the description supplies exactly the missing pieces: wait semantics, the timeout cap, and the terminal-state taxonomy. Nothing an agent needs to call this correctly is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are fully documented in the schema, including the default, maximum, and the handoffAction/nextAction guidance. The description only restates the 55s cap, so the baseline of 3 applies.

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?

Specific verb+resource: reads the answer/current state of an existing question created by ask_user or send_notification. Explicitly states what it does NOT do ('Does not send another question'), which cleanly separates it from the ask_user and send_notification siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tells the agent the source of the correlationId (ask_user response or linkedCorrelationId from send_notification) and clarifies the non-sending behavior, routing work back to ask_user. No explicit guidance on cancel_question vs waiting, so it stops short of the 5 bar.

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.

Resources