forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathElicitResult.cs
More file actions
50 lines (47 loc) · 1.59 KB
/
ElicitResult.cs
File metadata and controls
50 lines (47 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System.Text.Json;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents the client's response to an elicitation request.
/// </summary>
public sealed class ElicitResult : Result
{
/// <summary>
/// Gets or sets the user action in response to the elicitation.
/// </summary>
/// <value>
/// Defaults to "cancel" if not explicitly set.
/// </value>
/// <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 (default)</description>
/// </item>
/// </list>
/// </remarks>
[JsonPropertyName("action")]
public string Action { get; set; } = "cancel";
/// <summary>
/// Gets or sets the submitted form data.
/// </summary>
/// <remarks>
/// <para>
/// This is typically omitted if the action is "cancel" or "decline".
/// </para>
/// <para>
/// Values in the dictionary should be of types <see cref="JsonValueKind.String"/>, <see cref="JsonValueKind.Number"/>,
/// <see cref="JsonValueKind.True"/>, or <see cref="JsonValueKind.False"/>.
/// </para>
/// </remarks>
[JsonPropertyName("content")]
public IDictionary<string, JsonElement>? Content { get; set; }
}