# elicitation/create on the wire

## 1. client -> server (POST, answers arrive later on the same session)
tools/call restart_service {"service":"payments-api"}

## 2. server -> client, on the SSE stream of that same POST
{
  "jsonrpc": "2.0",
  "method": "elicitation/create",
  "id": "7899c995-7e19-45a9-8b27-a043acabe802-1",
  "params": {
    "message": "Restart payments-api? This drops in-flight requests.",
    "requestedSchema": {
      "type": "object",
      "properties": {
        "confirm": {
          "type": "boolean",
          "description": "Tick to approve the restart"
        },
        "ticket": {
          "type": "string",
          "description": "Change ticket number, e.g. CHG-2291"
        }
      },
      "required": [
        "confirm",
        "ticket"
      ]
    },
    "_meta": {},
    "mode": "form"
  }
}

## 3. client -> server, a NEW POST carrying the answer (same id as the server's request)
{
  "jsonrpc": "2.0",
  "id": "7899c995-7e19-45a9-8b27-a043acabe802-1",
  "result": {
    "action": "accept",
    "content": {
      "confirm": true,
      "ticket": "CHG-2291"
    }
  }
}

## 4. server -> client, the original tools/call finally completes
{
  "jsonrpc": "2.0",
  "id": 7,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "RESTARTED payments-api under CHG-2291"
      }
    ],
    "isError": false
  }
}
