AI seeded comments from robch and then edited by stephentoub (#238)

* AI generated `///` comment updates

* Fix compilation issues

* Fix incorrect XML comment structure

* Update all Client comments

* Update all Configuration comments

* Update all Messages comments

* Update all Transport comments

* Update all Types comments

* Update all Server comments

* Undo some commenting

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
Rob Chambers 2025-04-09 22:30:44 -07:00 • committed by GitHub
commit 77871c5aac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,26 +1,46 @@
namespace ModelContextProtocol.Protocol.Types;
using ModelContextProtocol.Protocol.Messages;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol.Types;
/// <summary>
/// Describes an argument that a prompt can accept.
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
/// 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>
/// The name of the argument.
/// Gets or sets the name of the argument used for referencing in prompt templates.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("name")]
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// A human-readable description of the argument.
/// Gets or sets a human-readable description of the argument's purpose and expected values.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("description")]
/// <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>
/// Whether this argument must be provided.
/// Gets or sets an indication as to whether this argument must be provided when requesting the prompt.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("required")]
/// <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; }
}