Fix XML documentation spelling, grammar, and correctness issues across SDK (#1372)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
parent
0e23854781
commit
3cc4863fc1
15 changed files with 90 additions and 92 deletions
|
|
@ -32,13 +32,12 @@ public sealed class BlobResourceContents : ResourceContents
|
|||
private ReadOnlyMemory<byte>? _blob;
|
||||
|
||||
/// <summary>
|
||||
/// Creates an <see cref="BlobResourceContents"/> from raw data.
|
||||
/// Creates a <see cref="BlobResourceContents"/> from raw data.
|
||||
/// </summary>
|
||||
/// <param name="bytes">The raw unencoded data.</param>
|
||||
/// <param name="uri">The URI of the blob resource.</param>
|
||||
/// <param name="mimeType">The optional MIME type of the data.</param>
|
||||
/// <returns>A new <see cref="BlobResourceContents"/> instance.</returns>
|
||||
/// <exception cref="InvalidOperationException"></exception>
|
||||
public static BlobResourceContents FromBytes(ReadOnlyMemory<byte> bytes, string uri, string? mimeType = null)
|
||||
{
|
||||
return new(bytes, uri, mimeType);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// </para>
|
||||
/// <para>
|
||||
/// This class is intentionally empty as the Model Context Protocol specification does not
|
||||
/// currently define additional properties for sampling capabilities. Future versions of the
|
||||
/// currently define additional properties for completions capabilities. Future versions of the
|
||||
/// specification might extend this capability with additional configuration options.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
|
|
|
|||
|
|
@ -69,8 +69,10 @@ public abstract class ContentBlock
|
|||
/// <summary>
|
||||
/// Provides a <see cref="JsonConverter"/> for <see cref="ContentBlock"/>.
|
||||
/// </summary>
|
||||
/// Provides a polymorphic converter for the <see cref="ContentBlock"/> class that doesn't require
|
||||
/// <remarks>
|
||||
/// Provides a polymorphic converter for the <see cref="ContentBlock"/> class that doesn't require
|
||||
/// setting <see cref="JsonSerializerOptions.AllowOutOfOrderMetadataProperties"/> explicitly.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public sealed class Converter : JsonConverter<ContentBlock>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -182,10 +182,12 @@ public sealed class ElicitRequestParams : RequestParams
|
|||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a <see cref="JsonConverter"/> for <see cref="ResourceContents"/>.
|
||||
/// Provides a <see cref="JsonConverter"/> for <see cref="PrimitiveSchemaDefinition"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Provides a polymorphic converter for the <see cref="PrimitiveSchemaDefinition"/> class that doesn't require
|
||||
/// setting <see cref="JsonSerializerOptions.AllowOutOfOrderMetadataProperties"/> explicitly.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public sealed class Converter : JsonConverter<PrimitiveSchemaDefinition>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public sealed class ElicitResult : Result
|
|||
/// Gets a value that indicates whether the elicitation was accepted by the user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If <see langword="true"/>, it indicates that the elicitation request completed successfully and value of <see cref="Content"/> has been populated with a value.
|
||||
/// If <see langword="true"/>, it indicates that the elicitation request completed successfully and the value of <see cref="Content"/> has been populated with a value.
|
||||
/// </remarks>
|
||||
[JsonIgnore]
|
||||
public bool IsAccepted => string.Equals(Action, "accept", StringComparison.OrdinalIgnoreCase);
|
||||
|
|
@ -122,7 +122,7 @@ public sealed class ElicitResult<T> : Result
|
|||
/// Gets a value that indicates whether the elicitation was accepted by the user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If <see langword="true"/>, it indicates that the elicitation request completed successfully and value of <see cref="Content"/> has been populated with a value.
|
||||
/// If <see langword="true"/>, it indicates that the elicitation request completed successfully and the value of <see cref="Content"/> has been populated with a value.
|
||||
/// </remarks>
|
||||
public bool IsAccepted => string.Equals(Action, "accept", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public abstract class JsonRpcMessage
|
|||
/// This property should only be set when implementing a custom <see cref="ITransport"/>
|
||||
/// that needs to pass additional per-message context or to pass a <see cref="JsonRpcMessageContext.User"/>
|
||||
/// to <see cref="StreamableHttpServerTransport.HandlePostRequestAsync(JsonRpcMessage, Stream, CancellationToken)"/>
|
||||
/// or <see cref="SseResponseStreamTransport.OnMessageReceivedAsync(JsonRpcMessage, CancellationToken)"/> .
|
||||
/// or <see cref="SseResponseStreamTransport.OnMessageReceivedAsync(JsonRpcMessage, CancellationToken)"/>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[JsonIgnore]
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public sealed class JsonRpcMessageContext
|
|||
public ITransport? RelatedTransport { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="ExecutionContext"/> that should be used to run any handlers
|
||||
/// Gets or sets the <see cref="ExecutionContext"/> that should be used to run any handlers.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This property is used to support the Streamable HTTP transport in its default stateful mode. In this mode,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace ModelContextProtocol.Protocol;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the parameters used with a <see cref="RequestMethods.ResourcesTemplatesList"/> request from a server to request
|
||||
/// Represents the parameters used with a <see cref="RequestMethods.RootsList"/> request from a server to request
|
||||
/// a list of roots available from the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// </para>
|
||||
/// <para>
|
||||
/// This class is intentionally empty as the Model Context Protocol specification does not
|
||||
/// currently define additional properties for sampling capabilities. Future versions of the
|
||||
/// currently define additional properties for logging capabilities. Future versions of the
|
||||
/// specification may extend this capability with additional configuration options.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// Indicates the severity of a log message.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// These value map to syslog message severities, as specified in <see href="https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1">RFC-5424</see>.
|
||||
/// These values map to syslog message severities, as specified in <see href="https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1">RFC-5424</see>.
|
||||
/// </remarks>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<LoggingLevel>))]
|
||||
public enum LoggingLevel
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol;
|
|||
public static class NotificationMethods
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of notification sent by a server when the list of available tools changes.
|
||||
/// The name of the notification sent by a server when the list of available tools changes.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This notification informs clients that the set of available tools has been modified.
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public abstract class Reference
|
|||
/// Provides a <see cref="JsonConverter"/> for <see cref="Reference"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Provides a polymorphic converter for the <see cref="Reference"/> class that doesn't require
|
||||
/// Provides a polymorphic converter for the <see cref="Reference"/> class that doesn't require
|
||||
/// setting <see cref="JsonSerializerOptions.AllowOutOfOrderMetadataProperties"/> explicitly.
|
||||
/// </remarks>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public static class RequestMethods
|
|||
public const string CompletionComplete = "completion/complete";
|
||||
|
||||
/// <summary>
|
||||
/// The name of the request method sent from the server to sample an large language model (LLM) via the client.
|
||||
/// The name of the request method sent from the server to sample a large language model (LLM) via the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This request allows servers to utilize an LLM available on the client side to generate text or image responses
|
||||
|
|
@ -113,7 +113,7 @@ public static class RequestMethods
|
|||
public const string ElicitationCreate = "elicitation/create";
|
||||
|
||||
/// <summary>
|
||||
/// The name of the request method sent from the client to the server when it first connects, asking it initialize.
|
||||
/// The name of the request method sent from the client to the server when it first connects, asking it to initialize.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The initialize request is the first request sent by the client to the server. It provides client information
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This notification can be issued by servers without any previous subscription from the client.
|
||||
/// This notification can be issued by clients without any previous subscription from the server.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol;
|
|||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This notification be issued by servers without any previous subscription from the client.
|
||||
/// This notification can be issued by servers without any previous subscription from the client.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
|
||||
|
|
|
|||
Loading…
Reference in a new issue