RequestContext.elicit

Request structured user input from the client (elicitation/create). requestedSchema must be a JSON Schema object. Throws on a stateless (MRTR) request — use ToolResponse.inputRequired instead — or if the client does not support elicitation.

This is form-mode elicitation; per spec the mode field is omitted and defaults to "form". For URL-mode elicitation use elicitUrl. Throws when the client did not declare the elicitation.form submode (a bare elicitation:{} is treated as form-only for 2025-06-18 compatibility). Returns the client's reply parsed into a typed ElicitResult (branch on .action; read collected values via .content or .contentAs!T).

  1. ElicitResult elicit(string message, Json requestedSchema)
    interface RequestContext
    final @safe
    elicit
    (
    string message
    ,)
  2. ElicitResult elicit(string message)