forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPromptArgument.cs
More file actions
45 lines (41 loc) · 1.77 KB
/
PromptArgument.cs
File metadata and controls
45 lines (41 loc) · 1.77 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
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents an argument that a prompt can accept for templating and customization.
/// </summary>
/// <remarks>
/// <para>
/// The <see cref="PromptArgument"/> class defines metadata for arguments that can be provided
/// to a prompt. These arguments are used to customize or parameterize prompts when they are
/// retrieved using <see cref="RequestMethods.PromptsGet"/> requests.
/// </para>
/// <para>
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
/// </para>
/// </remarks>
public class PromptArgument
{
/// <summary>
/// Gets or sets the name of the argument used for referencing in prompt templates.
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a human-readable description of the argument's purpose and expected values.
/// </summary>
/// <remarks>
/// This description helps developers understand what information should be provided
/// for this argument and how it will affect the generated prompt.
/// </remarks>
[JsonPropertyName("description")]
public string? Description { get; set; } = string.Empty;
/// <summary>
/// Gets or sets an indication as to whether this argument must be provided when requesting the prompt.
/// </summary>
/// <remarks>
/// When set to <see langword="true"/>, the client must include this argument when making a <see cref="RequestMethods.PromptsGet"/> request.
/// If a required argument is missing, the server should respond with an error.
/// </remarks>
[JsonPropertyName("required")]
public bool? Required { get; set; }
}