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,37 @@
namespace ModelContextProtocol.Protocol.Types;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol.Types;
/// <summary>
/// Represents a root URI and its metadata.
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
/// Represents a root URI and its metadata in the Model Context Protocol.
/// </summary>
/// <remarks>
/// Root URIs serve as entry points for resource navigation, typically representing
/// top-level directories or container resources that can be accessed and traversed.
/// Roots provide a hierarchical structure for organizing and accessing resources within the protocol.
/// Each root has a URI that uniquely identifies it and optional metadata like a human-readable name.
/// </remarks>
public class Root
{
/// <summary>
/// The URI of the root.
/// Gets or sets the URI of the root.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("uri")]
[JsonPropertyName("uri")]
public required string Uri { get; init; }
/// <summary>
/// A human-readable name for the root.
/// Gets or sets a human-readable name for the root.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("name")]
[JsonPropertyName("name")]
public string? Name { get; init; }
/// <summary>
/// Additional metadata for the root. Reserved by the protocol for future use.
/// Gets or sets additional metadata for the root.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("meta")]
public object? Meta { get; init; }
/// <remarks>
/// This is reserved by the protocol for future use.
/// </remarks>
[JsonPropertyName("meta")]
public JsonElement? Meta { get; init; }
}