csharp-sdk/src/ModelContextProtocol/Protocol/ElicitResult.cs
Stephen Toub 5cc7c00456
Add elicitation capability (#467)
* Add elicitation capability
2025-05-29 22:03:03 -04:00

41 lines
No EOL
1.2 KiB
C#

using System.Text.Json;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents the client's response to an elicitation request.
/// </summary>
public class ElicitResult
{
/// <summary>
/// Gets or sets the user action in response to the elicitation.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item>
/// <term>"accept"</term>
/// <description>User submitted the form/confirmed the action</description>
/// </item>
/// <item>
/// <term>"decline"</term>
/// <description>User explicitly declined the action</description>
/// </item>
/// <item>
/// <term>"cancel"</term>
/// <description>User dismissed without making an explicit choice</description>
/// </item>
/// </list>
/// </remarks>
[JsonPropertyName("action")]
public string Action { get; set; } = "cancel";
/// <summary>
/// Gets or sets the submitted form data.
/// </summary>
/// <remarks>
/// This is typically omitted if the action is "cancel" or "decline".
/// </remarks>
[JsonPropertyName("content")]
public JsonElement? Content { get; set; }
}