Table of Contents

Class ElicitResult<T>

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents the client's response to an elicitation request, with typed content payload.

public sealed class ElicitResult<T> : Result

Type Parameters

T

The type of the expected content payload.

Inheritance
ElicitResult<T>
Inherited Members

Properties

Action

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

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 as a typed value.

public T? Content { get; set; }

Property Value

T

IsAccepted

Gets a value that indicates whether the elicitation was accepted by the user.

public bool IsAccepted { get; }

Property Value

bool

Remarks

If true, it indicates that the elicitation request completed successfully and value of Content has been populated with a value.