Table of Contents

Class ElicitRequestParams

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents a message issued from the server to elicit additional information from the user via the client.

public sealed class ElicitRequestParams : RequestParams
Inheritance
ElicitRequestParams
Inherited Members

Properties

ElicitationId

Gets or sets a unique identifier for this elicitation request.

[JsonPropertyName("elicitationId")]
public string? ElicitationId { get; set; }

Property Value

string

Remarks

Used to track and correlate the elicitation across multiple messages, especially for out-of-band flows that may complete asynchronously.

Required for url mode elicitation to enable progress tracking and completion detection.

Message

Gets or sets the message to present to the user.

[JsonPropertyName("message")]
public required string Message { get; set; }

Property Value

string

Remarks

For form mode, this describes what information is being requested. For url mode, this explains why the user needs to navigate to the URL.

Mode

Gets or sets the elicitation mode: "form" for in-band data collection or "url" for out-of-band URL navigation.

[JsonPropertyName("mode")]
public string Mode { get; set; }

Property Value

string

Remarks

  • form: Client collects structured data via a form interface. Data is exposed to the client.
  • url: Client navigates user to a URL for out-of-band interaction. Sensitive data is not exposed to the client.

RequestedSchema

Gets or sets the requested schema for form mode elicitation.

[JsonPropertyName("requestedSchema")]
public ElicitRequestParams.RequestSchema? RequestedSchema { get; set; }

Property Value

ElicitRequestParams.RequestSchema

Possible values are ElicitRequestParams.StringSchema, ElicitRequestParams.NumberSchema, ElicitRequestParams.BooleanSchema, ElicitRequestParams.UntitledSingleSelectEnumSchema, ElicitRequestParams.TitledSingleSelectEnumSchema, ElicitRequestParams.UntitledMultiSelectEnumSchema, ElicitRequestParams.TitledMultiSelectEnumSchema, and ElicitRequestParams.LegacyTitledEnumSchema (deprecated).

Remarks

Only applicable when Mode is "form".

Url

Gets or sets the URL to navigate to for out-of-band elicitation.

[JsonPropertyName("url")]
public string? Url { get; set; }

Property Value

string

Remarks

Required when Mode is "url". The client should prompt the user for consent and then navigate to this URL in a user-agent (browser) where the user completes the required interaction.

URLs must not appear in any other field of the elicitation request for security reasons.