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,40 +1,70 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol.Types;
/// <summary>
/// Represents a known resource template that the server is capable of reading.
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
/// </summary>
/// <remarks>
/// Resource templates provide metadata about resources available on the server,
/// including how to construct URIs for those resources.
/// </remarks>
public record ResourceTemplate
{
/// <summary>
/// The URI template (according to RFC 6570) that can be used to construct resource URIs.
/// Gets or sets the URI template (according to RFC 6570) that can be used to construct resource URIs.
/// </summary>
[JsonPropertyName("uriTemplate")]
public required string UriTemplate { get; init; }
/// <summary>
/// A human-readable name for this resource template.
/// Gets or sets a human-readable name for this resource template.
/// </summary>
[JsonPropertyName("name")]
public required string Name { get; init; }
/// <summary>
/// A description of what this resource template represents.
/// Gets or sets a description of what this resource template represents.
/// </summary>
/// <remarks>
/// <para>
/// This description helps clients understand the purpose and content of resources
/// that can be generated from this template. It can be used by client applications
/// to provide context about available resource types or to display in user interfaces.
/// </para>
/// <para>
/// For AI models, this description can serve as a hint about when and how to use
/// the resource template, enhancing the model's ability to generate appropriate URIs.
/// </para>
/// </remarks>
[JsonPropertyName("description")]
public string? Description { get; init; }
/// <summary>
/// The MIME type of this resource template, if known.
/// Gets or sets the MIME type of this resource template, if known.
/// </summary>
/// <remarks>
/// <para>
/// Specifies the expected format of resources that can be generated from this template.
/// This helps clients understand what type of content to expect when accessing resources
/// created using this template.
/// </para>
/// <para>
/// Common MIME types include "text/plain" for plain text, "application/pdf" for PDF documents,
/// "image/png" for PNG images, or "application/json" for JSON data.
/// </para>
/// </remarks>
[JsonPropertyName("mimeType")]
public string? MimeType { get; init; }
/// <summary>
/// Optional annotations for the resource template.
/// Gets or sets optional annotations for the resource template.
/// </summary>
/// <remarks>
/// These annotations can be used to specify the intended audience (<see cref="Role.User"/>, <see cref="Role.Assistant"/>, or both)
/// and the priority level of the resource template. Clients can use this information to filter
/// or prioritize resource templates for different roles.
/// </remarks>
[JsonPropertyName("annotations")]
public Annotations? Annotations { get; init; }
}