Skip to main content
Glama

Ask the user to confirm (OK/Cancel)

elicit_confirm

Ask the user an OK/Cancel confirmation via elicitation (convenience wrapper over elicit_form), modeled on JavaScript's confirm(). Use this for a single yes/no question; use elicit_form to collect arbitrary fields. Returns three-state {confirmed}: true = proceed, false = a human explicitly said no, null = no answer was obtained (reason: "dismissed" | "error") — ask again later.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelsNoRelabel or localize the OK/Cancel buttons. Each label is trimmed, 1-40 characters; unknown keys are rejected. Button placement and styling stay fixed.
messageYesThe yes/no question shown to the user in the host's elicitation dialog.
timeoutSecondsNoHow long to wait for the answer, in seconds (default 300, clamped 60-3600).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoPresent only when confirmed is null: "dismissed" = the elicitation was closed unanswered (including timeout), "error" = it failed.
confirmedYestrue = the user chose OK; false = an explicit no (Cancel choice or declined elicitation); null = no answer was obtained.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +{}
  2. Changed6 schema fields changed
    • addedInput schema / properties / labels / description
      Added value: +"Relabel or localize the OK/Cancel buttons. Each label is trimmed, 1-40 characters; unknown keys are rejected. Button placement and styling stay fixed."
    • addedInput schema / properties / labels / properties / cancel / description
      Added value: +"Replacement label for the Cancel button (e.g. \"Cancelar\")."
    • addedInput schema / properties / labels / properties / ok / description
      Added value: +"Replacement label for the OK button (e.g. \"Aceptar\")."
    • addedInput schema / properties / message / description
      Added value: +"The yes/no question shown to the user in the host's elicitation dialog."
    • addedInput schema / properties / timeoutSeconds / description
      Added value: +"How long to wait for the answer, in seconds (default 300, clamped 60-3600)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "confirmed": {
      +      "description": "true = the user chose OK; false = an explicit no (Cancel choice or declined elicitation); null = no answer was obtained.",
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "reason": {
      +      "description": "Present only when confirmed is null: \"dismissed\" = the elicitation was closed unanswered (including timeout), \"error\" = it failed.",
      +      "enum": [
      +        "dismissed",
      +        "error"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "confirmed"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources