createElicitation

suspend fun createElicitation(message: String, requestedSchema: ElicitRequestParams.RequestedSchema, options: RequestOptions? = null): ElicitResult(source)

Sends a message to the client requesting an elicitation. This typically results in a form being displayed to the end user.

Return

The result of the elicitation request.

Parameters

message

The message for the elicitation to display.

requestedSchema

The schema requested by the client for the elicitation result. Influences the form displayed to the user.

options

Optional request options.

Throws

If the server or client does not support elicitation.


suspend fun createElicitation(message: String, elicitationId: String, url: String, options: RequestOptions? = null): ElicitResult(source)

Sends a URL mode elicitation request to the client, directing the user to an external URL for out-of-band interactions.

Return

The result of the elicitation request.

Parameters

message

The message explaining why the interaction is needed.

elicitationId

A unique identifier for the elicitation.

url

The URL that the user should navigate to.

options

Optional request options.

Throws

If the server or client does not support elicitation.