Skip to content

Commit 3cc4863

Browse files
CopilotCopilotstephentoub
authored
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>
1 parent 0e23854 commit 3cc4863

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+90
-92
lines changed

src/Common/Experimentals.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace ModelContextProtocol;
44

55
/// <summary>
6-
/// Defines diagnostic IDs, Messages, and Urls for APIs annotated with <see cref="ExperimentalAttribute"/>.
6+
/// Defines diagnostic IDs, messages, and URLs for APIs annotated with <see cref="ExperimentalAttribute"/>.
77
/// </summary>
88
/// <remarks>
99
/// When an experimental API is associated with an experimental specification, the message

src/Common/Obsoletions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
namespace ModelContextProtocol;
22

33
/// <summary>
4-
/// Defines diagnostic IDs, Messages, and Urls for APIs annotated with <see cref="ObsoleteAttribute"/>.
4+
/// Defines diagnostic IDs, messages, and URLs for APIs annotated with <see cref="ObsoleteAttribute"/>.
55
/// </summary>
66
/// <remarks>
7-
/// When a deprecated API is associated with an specification change, the message
7+
/// When a deprecated API is associated with a specification change, the message
88
/// should refer to the specification version that introduces the change and the SEP
99
/// when available. If there is a SEP associated with the experimental API, the Url should
1010
/// point to the SEP issue.

src/ModelContextProtocol.Analyzers/EquatableArray.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace ModelContextProtocol.Analyzers;
1515
/// <param name="source">The source to enumerate and wrap.</param>
1616
public EquatableArray(IEnumerable<T> source) => _array = source.ToArray();
1717

18-
/// <param name="source">The source to wrap.</param>
18+
/// <param name="array">The source to wrap.</param>
1919
public EquatableArray(T[] array) => _array = array;
2020

2121
/// <summary>Gets a reference to an item at a specified position within the array.</summary>

src/ModelContextProtocol.AspNetCore/Authentication/McpAuthenticationExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
namespace Microsoft.Extensions.DependencyInjection;
55

66
/// <summary>
7-
/// Extension methods for adding MCP authorization support to ASP.NET Core applications.
7+
/// Extension methods for adding MCP authentication support to ASP.NET Core applications.
88
/// </summary>
99
public static class McpAuthenticationExtensions
1010
{
1111
/// <summary>
12-
/// Adds MCP authorization support to the application.
12+
/// Adds MCP authentication support to the application.
1313
/// </summary>
1414
/// <param name="builder">The authentication builder.</param>
1515
/// <param name="configureOptions">An action to configure MCP authentication options.</param>
@@ -26,7 +26,7 @@ public static AuthenticationBuilder AddMcp(
2626
}
2727

2828
/// <summary>
29-
/// Adds MCP authorization support to the application with a custom scheme name.
29+
/// Adds MCP authentication support to the application with a custom scheme name.
3030
/// </summary>
3131
/// <param name="builder">The authentication builder.</param>
3232
/// <param name="authenticationScheme">The authentication scheme name to use.</param>

src/ModelContextProtocol.AspNetCore/HttpMcpServerBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static class HttpMcpServerBuilderExtensions
2020
/// <see cref="McpServerOptions"/> and running logic before and after a session.</param>
2121
/// <returns>The builder provided in <paramref name="builder"/>.</returns>
2222
/// <remarks>For more information on configuring the underlying HTTP server
23-
/// to control things like port binding custom TLS certificates, see the <see href="https://learn.microsoft.com/aspnet/core/fundamentals/minimal-apis">Minimal APIs quick reference</see>.
23+
/// to control things like port binding and custom TLS certificates, see the <see href="https://learn.microsoft.com/aspnet/core/fundamentals/minimal-apis">Minimal APIs quick reference</see>.
2424
/// </remarks>
2525
/// <exception cref="ArgumentNullException"><paramref name="builder"/> is <see langword="null"/>.</exception>
2626
public static IMcpServerBuilder WithHttpTransport(this IMcpServerBuilder builder, Action<HttpServerTransportOptions>? configureOptions = null)

src/ModelContextProtocol.AspNetCore/HttpServerTransportOptions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace ModelContextProtocol.AspNetCore;
55

66
/// <summary>
77
/// Represents configuration options for <see cref="M:McpEndpointRouteBuilderExtensions.MapMcp"/>,
8-
/// which implements the Streaming HTTP transport for the Model Context Protocol.
8+
/// which implements the Streamable HTTP transport for the Model Context Protocol.
99
/// See the protocol specification for details on the Streamable HTTP transport. <see href="https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#streamable-http"/>
1010
/// </summary>
1111
/// <remarks>
@@ -23,7 +23,7 @@ public class HttpServerTransportOptions
2323
/// Gets or sets an optional asynchronous callback for running new MCP sessions manually.
2424
/// </summary>
2525
/// <remarks>
26-
/// This callback is useful for running logic before a sessions starts and after it completes.
26+
/// This callback is useful for running logic before a session starts and after it completes.
2727
/// </remarks>
2828
public Func<HttpContext, McpServer, CancellationToken, Task>? RunSessionHandler { get; set; }
2929

@@ -36,7 +36,7 @@ public class HttpServerTransportOptions
3636
/// </value>
3737
/// <remarks>
3838
/// If <see langword="true"/>, <see cref="McpSession.SessionId"/> will be null, and the "MCP-Session-Id" header will not be used,
39-
/// the <see cref="RunSessionHandler"/> will be called once for for each request, and the "/sse" endpoint will be disabled.
39+
/// the <see cref="RunSessionHandler"/> will be called once for each request, and the "/sse" endpoint will be disabled.
4040
/// Unsolicited server-to-client messages and all server-to-client requests are also unsupported, because any responses
4141
/// might arrive at another ASP.NET Core application process.
4242
/// Client sampling, elicitation, and roots capabilities are also disabled in stateless mode, because the server cannot make requests.
@@ -87,7 +87,7 @@ public class HttpServerTransportOptions
8787
public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromHours(2);
8888

8989
/// <summary>
90-
/// Gets or sets maximum number of idle sessions to track in memory. This value is used to limit the number of sessions that can be idle at once.
90+
/// Gets or sets the maximum number of idle sessions to track in memory. This value is used to limit the number of sessions that can be idle at once.
9191
/// </summary>
9292
/// <value>
9393
/// The maximum number of idle sessions to track in memory. The default is 10,000 sessions.

src/ModelContextProtocol.Core/AIContentExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public static IList<AIContent> ToAIContents(this IEnumerable<ContentBlock> conte
367367
/// </para>
368368
/// <para>
369369
/// Each <see cref="ResourceContents"/> object is converted using <see cref="ToAIContent(ResourceContents)"/>,
370-
/// preserving the type-specific conversion logic: text resources become <see cref="TextContentBlock"/> objects and
370+
/// preserving the type-specific conversion logic: text resources become <see cref="TextContent"/> objects and
371371
/// binary resources become <see cref="DataContent"/> objects.
372372
/// </para>
373373
/// </remarks>

src/ModelContextProtocol.Core/Authentication/ClientOAuthProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ private static string NormalizeUri(string uriString)
772772
/// <param name="response">The HTTP response containing the WWW-Authenticate header.</param>
773773
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests.</param>
774774
/// <returns>The resource metadata if the resource matches the server, otherwise throws an exception.</returns>
775-
/// <exception cref="InvalidOperationException">Thrown when the response is not a 401, the metadata can't be fetched, or the resource URI doesn't match the server URL.</exception>
775+
/// <exception cref="McpException">Thrown when the metadata can't be fetched or the resource URI doesn't match the server URL.</exception>
776776
private async Task<ProtectedResourceMetadata> ExtractProtectedResourceMetadata(HttpResponseMessage response, CancellationToken cancellationToken)
777777
{
778778
Uri resourceUri = _serverUrl;

src/ModelContextProtocol.Core/Authentication/ProtectedResourceMetadata.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
namespace ModelContextProtocol.Authentication;
55

66
/// <summary>
7-
/// Represents the resource metadata for OAuth authorization as defined in RFC 9396.
8-
/// Defined by <see href="https://datatracker.ietf.org/doc/rfc9728/">RFC 9728</see>.
7+
/// Represents the resource metadata for OAuth authorization as defined in <see href="https://datatracker.ietf.org/doc/rfc9728/">RFC 9728</see>.
98
/// </summary>
109
public sealed class ProtectedResourceMetadata
1110
{

src/ModelContextProtocol.Core/Client/HttpClientTransportOptions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public required Uri Endpoint
105105
public bool OwnsSession { get; set; } = true;
106106

107107
/// <summary>
108-
/// Gets sor sets the authorization provider to use for authentication.
108+
/// Gets or sets the authorization provider to use for authentication.
109109
/// </summary>
110110
public ClientOAuthOptions? OAuth { get; set; }
111111

@@ -127,13 +127,13 @@ public required Uri Endpoint
127127
/// Gets or sets the default interval at which the client attempts reconnection after an SSE stream is disconnected.
128128
/// </summary>
129129
/// <remarks>
130-
/// <p>
130+
/// <para>
131131
/// The default value is 1 second.
132-
/// </p>
133-
/// <p>
132+
/// </para>
133+
/// <para>
134134
/// If the server sends a message specifying a different reconnection interval, that new value will be used for all
135135
/// subsequent reconnection attempts for that stream.
136-
/// </p>
136+
/// </para>
137137
/// </remarks>
138138
public TimeSpan DefaultReconnectionInterval { get; set; } = TimeSpan.FromSeconds(1);
139139
}

0 commit comments

Comments
 (0)