Table of Contents

Class ElicitResult

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents the client's response to an elicitation request.

public sealed class ElicitResult : Result
Inheritance
ElicitResult
Inherited Members

Properties

Action

Gets or sets the user action in response to the elicitation.

[JsonPropertyName("action")]
public string Action { get; set; }

Property Value

string

Defaults to "cancel" if not explicitly set.

Remarks

  • "accept"User submitted the form/confirmed the action
  • "decline"User explicitly declined the action
  • "cancel"User dismissed without making an explicit choice (default)

Content

Gets or sets the submitted form data.

[JsonPropertyName("content")]
public IDictionary<string, JsonElement>? Content { get; set; }

Property Value

IDictionary<string, JsonElement>

Remarks

This is typically omitted if the action is "cancel" or "decline".

Values in the dictionary should be of types String, Number, True, or False.

IsAccepted

Convenience indicator for whether the elicitation was accepted by the user.

[JsonIgnore]
public bool IsAccepted { get; }

Property Value

bool

Remarks

Indicates that the elicitation request completed successfully and value of Content has been populated with a value.