Core Protocol docs edit pass (#1032)

This commit is contained in:
Genevieve Warren 2025-11-25 20:05:25 -08:00 • committed by GitHub
commit c87eba3f1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,7 @@ using ModelContextProtocol.Server;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents the capabilities that a client may support.
/// Represents the capabilities that a client supports.
/// </summary>
/// <remarks>
/// <para>
@ -24,13 +24,13 @@ public sealed class ClientCapabilities
/// </summary>
/// <remarks>
/// <para>
/// The <see cref="Experimental"/> dictionary allows clients to advertise support for features that are not yet
/// standardized in the Model Context Protocol specification. This extension mechanism enables
/// The <see cref="Experimental"/> dictionary allows clients to advertise support for features that are not yet
/// standardized in the Model Context Protocol specification. This extension mechanism enables
/// future protocol enhancements while maintaining backward compatibility.
/// </para>
/// <para>
/// Values in this dictionary are implementation-specific and should be coordinated between client
/// and server implementations. Servers should not assume the presence of any experimental capability
/// Values in this dictionary are implementation-specific and should be coordinated between client
/// and server implementations. Servers should not assume the presence of any experimental capability
/// without checking for it first.
/// </para>
/// </remarks>
@ -42,7 +42,7 @@ public sealed class ClientCapabilities
/// </summary>
/// <remarks>
/// <para>
/// When <see cref="Roots"/> is non-<see langword="null"/>, the client indicates that it can respond to
/// When <see cref="Roots"/> is non-<see langword="null"/>, the client indicates that it can respond to
/// server requests for listing root URIs. Root URIs serve as entry points for resource navigation in the protocol.
/// </para>
/// <para>
@ -54,14 +54,14 @@ public sealed class ClientCapabilities
public RootsCapability? Roots { get; set; }
/// <summary>
/// Gets or sets the client's sampling capability, which indicates whether the client
/// Gets or sets the client's sampling capability, which indicates whether the client
/// supports issuing requests to an LLM on behalf of the server.
/// </summary>
[JsonPropertyName("sampling")]
public SamplingCapability? Sampling { get; set; }
/// <summary>
/// Gets or sets the client's elicitation capability, which indicates whether the client
/// Gets or sets the client's elicitation capability, which indicates whether the client
/// supports elicitation of additional information from the user on behalf of the server.
/// </summary>
[JsonPropertyName("elicitation")]
@ -70,7 +70,7 @@ public sealed class ClientCapabilities
/// <summary>Gets or sets notification handlers to register with the client.</summary>
/// <remarks>
/// <para>
/// When constructed, the client will enumerate these handlers once, which may contain multiple handlers per notification method key.
/// When constructed, the client will enumerate these handlers, which may contain multiple handlers per notification method key, once.
/// The client will not re-enumerate the sequence after initialization.
/// </para>
/// <para>
@ -80,7 +80,7 @@ public sealed class ClientCapabilities
/// </para>
/// <para>
/// Handlers provided via <see cref="NotificationHandlers"/> will be registered with the client for the lifetime of the client.
/// For transient handlers, <see cref="McpSession.RegisterNotificationHandler"/> may be used to register a handler that can
/// For transient handlers, <see cref="McpSession.RegisterNotificationHandler"/> can be used to register a handler that can
/// then be unregistered by disposing of the <see cref="IAsyncDisposable"/> returned from the method.
/// </para>
/// </remarks>
@ -88,4 +88,4 @@ public sealed class ClientCapabilities
[Obsolete($"Use {nameof(McpClientOptions.Handlers.NotificationHandlers)} instead. This member will be removed in a subsequent release.")] // See: https://github.com/modelcontextprotocol/csharp-sdk/issues/774
[EditorBrowsable(EditorBrowsableState.Never)]
public IEnumerable<KeyValuePair<string, Func<JsonRpcNotification, CancellationToken, ValueTask>>>? NotificationHandlers { get; set; }
}
}