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:
Copilot 2026-02-23 23:56:22 -05:00 • committed by GitHub
commit 3cc4863fc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 90 additions and 92 deletions

View file

@ -69,7 +69,7 @@ public interface IMcpTaskStore
/// <param name="result">The operation result to store as a JSON element.</param>
/// <param name="sessionId">Optional session identifier for access control.</param>
/// <param name="cancellationToken">Cancellation token for the operation.</param>
/// <returns>A task representing the asynchronous operation.</returns>
/// <returns>The updated <see cref="McpTask"/> with the new status and result stored.</returns>
/// <remarks>
/// <para>
/// The <paramref name="status"/> must be either <see cref="McpTaskStatus.Completed"/> or
@ -81,7 +81,6 @@ public interface IMcpTaskStore
/// that is already in a terminal state, to prevent result overwrites.
/// </para>
/// </remarks>
/// <returns>The updated <see cref="McpTask"/> with the new status and result stored.</returns>
Task<McpTask> StoreTaskResultAsync(
string taskId,
McpTaskStatus status,
@ -111,14 +110,13 @@ public interface IMcpTaskStore
/// <param name="statusMessage">Optional diagnostic message describing the status change.</param>
/// <param name="sessionId">Optional session identifier for access control.</param>
/// <param name="cancellationToken">Cancellation token for the operation.</param>
/// <returns>A task representing the asynchronous operation.</returns>
/// <returns>The updated <see cref="McpTask"/> with the new status applied.</returns>
/// <remarks>
/// This method updates the task's <see cref="McpTask.Status"/>, <see cref="McpTask.StatusMessage"/>,
/// and <see cref="McpTask.LastUpdatedAt"/> properties. Common uses include transitioning to
/// <see cref="McpTaskStatus.Cancelled"/>, <see cref="McpTaskStatus.InputRequired"/>, or updating
/// progress messages while in <see cref="McpTaskStatus.Working"/> status.
/// </remarks>
/// <returns>The updated <see cref="McpTask"/> with the new status applied.</returns>
Task<McpTask> UpdateTaskStatusAsync(
string taskId,
McpTaskStatus status,

View file

@ -33,8 +33,8 @@ public sealed class McpServerOptions
/// <remarks>
/// The protocol version defines which features and message formats this server supports.
/// This uses a date-based versioning scheme in the format "YYYY-MM-DD".
/// If <see langword="null"/>, the server will advertize to the client the version requested
/// by the client if that version is known to be supported, and otherwise will advertize the latest
/// If <see langword="null"/>, the server will advertise to the client the version requested
/// by the client if that version is known to be supported, and otherwise will advertise the latest
/// version supported by the server.
/// </remarks>
public string? ProtocolVersion { get; set; }

View file

@ -40,7 +40,7 @@ public class McpServerPrimitiveCollection<T> : ICollection<T>, IReadOnlyCollecti
/// <param name="name">The name of the primitive to retrieve.</param>
/// <returns>The <typeparamref name="T"/> with the specified name.</returns>
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
/// <exception cref="KeyNotFoundException">An primitive with the specified name does not exist in the collection.</exception>
/// <exception cref="KeyNotFoundException">A primitive with the specified name does not exist in the collection.</exception>
public T this[string name]
{
get

View file

@ -174,7 +174,7 @@ public abstract class McpServerPrompt : IMcpServerPrimitive
AIFunctionMcpServerPrompt.Create(method, options);
/// <summary>
/// Creates an <see cref="McpServerPrompt"/> instance for a method, specified via a <see cref="Delegate"/> instance.
/// Creates an <see cref="McpServerPrompt"/> instance for a method, specified via a <see cref="MethodInfo"/> instance.
/// </summary>
/// <param name="method">The method to be represented via the created <see cref="McpServerPrompt"/>.</param>
/// <param name="target">The instance if <paramref name="method"/> is an instance method; otherwise, <see langword="null"/>.</param>
@ -189,18 +189,18 @@ public abstract class McpServerPrompt : IMcpServerPrimitive
AIFunctionMcpServerPrompt.Create(method, target, options);
/// <summary>
/// Creates an <see cref="McpServerPrompt"/> instance for a method, specified via an <see cref="MethodInfo"/> for
/// and instance method, along with a <see cref="Type"/> representing the type of the target object to
/// Creates an <see cref="McpServerPrompt"/> instance for a method, specified via a <see cref="MethodInfo"/> for
/// an instance method, along with a <see cref="Type"/> representing the type of the target object to
/// instantiate each time the method is invoked.
/// </summary>
/// <param name="method">The instance method to be represented via the created <see cref="AIFunction"/>.</param>
/// <param name="method">The instance method to be represented via the created <see cref="McpServerPrompt"/>.</param>
/// <param name="createTargetFunc">
/// Callback used on each function invocation to create an instance of the type on which the instance method <paramref name="method"/>
/// will be invoked. If the returned instance is <see cref="IAsyncDisposable"/> or <see cref="IDisposable"/>, it will
/// be disposed of after method completes its invocation.
/// </param>
/// <param name="options">Optional options used in the creation of the <see cref="McpServerPrompt"/> to control its behavior.</param>
/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
/// <returns>The created <see cref="McpServerPrompt"/> for invoking <paramref name="method"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="method"/> or <paramref name="createTargetFunc"/> is <see langword="null"/>.</exception>
public static McpServerPrompt Create(
MethodInfo method,

View file

@ -136,7 +136,7 @@ public abstract class McpServerResource : IMcpServerPrimitive
/// <remarks>
/// <para>
/// The <see cref="ProtocolResourceTemplate"/> property represents the underlying resource template definition as defined in the
/// Model Context Protocol specification. It contains metadata like the resource templates's URI template, name, and description.
/// Model Context Protocol specification. It contains metadata like the resource template's URI template, name, and description.
/// </para>
/// <para>
/// Every valid resource URI is a valid resource URI template, and thus this property always returns an instance.
@ -148,8 +148,8 @@ public abstract class McpServerResource : IMcpServerPrimitive
/// <summary>Gets the protocol <see cref="Resource"/> type for this instance.</summary>
/// <remarks>
/// The ProtocolResourceTemplate property represents the underlying resource template definition as defined in the
/// Model Context Protocol specification. It contains metadata like the resource templates's URI template, name, and description.
/// The ProtocolResource property represents the underlying resource definition as defined in the
/// Model Context Protocol specification. It contains metadata like the resource template's URI template, name, and description.
/// </remarks>
public virtual Resource? ProtocolResource => ProtocolResourceTemplate.AsResource();
@ -209,7 +209,7 @@ public abstract class McpServerResource : IMcpServerPrimitive
AIFunctionMcpServerResource.Create(method, options);
/// <summary>
/// Creates an <see cref="McpServerResource"/> instance for a method, specified via a <see cref="Delegate"/> instance.
/// Creates an <see cref="McpServerResource"/> instance for a method, specified via a <see cref="MethodInfo"/> instance.
/// </summary>
/// <param name="method">The method to be represented via the created <see cref="McpServerResource"/>.</param>
/// <param name="target">The instance if <paramref name="method"/> is an instance method; otherwise, <see langword="null"/>.</param>
@ -224,18 +224,18 @@ public abstract class McpServerResource : IMcpServerPrimitive
AIFunctionMcpServerResource.Create(method, target, options);
/// <summary>
/// Creates an <see cref="McpServerResource"/> instance for a method, specified via an <see cref="MethodInfo"/> for
/// Creates an <see cref="McpServerResource"/> instance for a method, specified via a <see cref="MethodInfo"/> for
/// an instance method, along with a <see cref="Type"/> representing the type of the target object to
/// instantiate each time the method is invoked.
/// </summary>
/// <param name="method">The instance method to be represented via the created <see cref="AIFunction"/>.</param>
/// <param name="method">The instance method to be represented via the created <see cref="McpServerResource"/>.</param>
/// <param name="createTargetFunc">
/// The callback used on each function invocation to create an instance of the type on which the instance method <paramref name="method"/>
/// will be invoked. If the returned instance is <see cref="IAsyncDisposable"/> or <see cref="IDisposable"/>, it will
/// be disposed of after method completes its invocation.
/// </param>
/// <param name="options">Optional options used in the creation of the <see cref="McpServerResource"/> to control its behavior.</param>
/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
/// <returns>The created <see cref="McpServerResource"/> for invoking <paramref name="method"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="method"/> or <paramref name="createTargetFunc"/> is <see langword="null"/>.</exception>
public static McpServerResource Create(
MethodInfo method,

View file

@ -46,7 +46,7 @@ public sealed class McpServerResourceCreateOptions
/// </summary>
/// <remarks>
/// If <see langword="null"/>, but an <see cref="McpServerResourceAttribute"/> is applied to the member,
/// the name from the attribute is used. If that's not present, a name based on the members's name is used.
/// the name from the attribute is used. If that's not present, a name based on the member's name is used.
/// </remarks>
public string? Name { get; set; }

View file

@ -188,7 +188,7 @@ public abstract class McpServerTool : IMcpServerPrimitive
AIFunctionMcpServerTool.Create(method, options);
/// <summary>
/// Creates an <see cref="McpServerTool"/> instance for a method, specified via a <see cref="Delegate"/> instance.
/// Creates an <see cref="McpServerTool"/> instance for a method, specified via a <see cref="MethodInfo"/> instance.
/// </summary>
/// <param name="method">The method to be represented via the created <see cref="McpServerTool"/>.</param>
/// <param name="target">The instance if <paramref name="method"/> is an instance method; otherwise, <see langword="null"/>.</param>
@ -203,18 +203,18 @@ public abstract class McpServerTool : IMcpServerPrimitive
AIFunctionMcpServerTool.Create(method, target, options);
/// <summary>
/// Creates an <see cref="McpServerTool"/> instance for a method, specified via an <see cref="MethodInfo"/> for
/// Creates an <see cref="McpServerTool"/> instance for a method, specified via a <see cref="MethodInfo"/> for
/// an instance method, along with a <see cref="Type"/> representing the type of the target object to
/// instantiate each time the method is invoked.
/// </summary>
/// <param name="method">The instance method to be represented via the created <see cref="AIFunction"/>.</param>
/// <param name="method">The instance method to be represented via the created <see cref="McpServerTool"/>.</param>
/// <param name="createTargetFunc">
/// Callback used on each function invocation to create an instance of the type on which the instance method <paramref name="method"/>
/// will be invoked. If the returned instance is <see cref="IAsyncDisposable"/> or <see cref="IDisposable"/>, it will
/// be disposed of after method completes its invocation.
/// </param>
/// <param name="options">Optional options used in the creation of the <see cref="McpServerTool"/> to control its behavior.</param>
/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
/// <returns>The created <see cref="McpServerTool"/> for invoking <paramref name="method"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="method"/> or <paramref name="createTargetFunc"/> is <see langword="null"/>.</exception>
public static McpServerTool Create(
MethodInfo method,

View file

@ -58,7 +58,7 @@ namespace ModelContextProtocol.Server;
/// When the <see cref="McpServerTool"/> is constructed, it may be passed an <see cref="IServiceProvider"/> via
/// <see cref="McpServerToolCreateOptions.Services"/>. Any parameter that can be satisfied by that <see cref="IServiceProvider"/>
/// according to <see cref="IServiceProviderIsService"/> will not be included in the generated JSON schema and will be resolved
/// from the <see cref="IServiceProvider"/> provided to when the tool is invoked rather than from the argument collection.
/// from the <see cref="IServiceProvider"/> provided when the tool is invoked rather than from the argument collection.
/// </description>
/// </item>
/// <item>

View file

@ -176,7 +176,7 @@ public sealed partial class StreamableHttpServerTransport : ITransport
/// <param name="responseStream">The POST response body to write MCP JSON-RPC messages to.</param>
/// <returns>
/// <see langword="true"/> if data was written to the response body.
/// <see false="false"/> if nothing was written because the request body did not contain any <see cref="JsonRpcRequest"/> messages to respond to.
/// <see langword="false"/> if nothing was written because the request body did not contain any <see cref="JsonRpcRequest"/> messages to respond to.
/// The HTTP application should typically respond with an empty "202 Accepted" response in this scenario.
/// </returns>
/// <exception cref="ArgumentNullException"><paramref name="message"/> or <paramref name="responseStream"/> is <see langword="null"/>.</exception>