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,20 +1,43 @@
namespace ModelContextProtocol.Protocol.Types;
using ModelContextProtocol.Protocol.Messages;
using Microsoft.Extensions.AI;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol.Types;
/// <summary>
/// The server's response to a prompts/get request from the client.
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
/// Represents a server's response to a <see cref="RequestMethods.PromptsGet"/> request from the client.
/// </summary>
/// <remarks>
/// <para>
/// For integration with AI client libraries, <see cref="GetPromptResult"/> can be converted to
/// a collection of <see cref="ChatMessage"/> objects using the <see cref="AIContentExtensions.ToChatMessages"/> extension method.
/// </para>
/// <para>
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
/// </para>
/// </remarks>
public class GetPromptResult
{
/// <summary>
/// An optional description for the prompt.
/// Gets or sets an optional description for the prompt.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("description")]
/// <remarks>
/// <para>
/// This description provides contextual information about the prompt's purpose and use cases.
/// It helps developers understand what the prompt is designed for and how it should be used.
/// </para>
/// <para>
/// When returned from a server in response to a <see cref="RequestMethods.PromptsGet"/> request,
/// this description can be used by client applications to provide context about the prompt or to
/// display in user interfaces.
/// </para>
/// </remarks>
[JsonPropertyName("description")]
public string? Description { get; set; }
/// <summary>
/// The prompt or prompt template that the server offers.
/// Gets or sets the prompt that the server offers.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("messages")]
[JsonPropertyName("messages")]
public List<PromptMessage> Messages { get; set; } = [];
}