Skip to content

Comments

Fix incorrect XML doc comments in McpClient.Methods.cs#1333

Merged
stephentoub merged 2 commits intomainfrom
copilot/fix-xml-documentation-comments
Feb 21, 2026
Merged

Fix incorrect XML doc comments in McpClient.Methods.cs#1333
stephentoub merged 2 commits intomainfrom
copilot/fix-xml-documentation-comments

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

Two <summary> doc comments in McpClient.Methods.cs had copy-paste errors that described the wrong behavior.

  • GetPromptAsync(GetPromptRequestParams, ...): summary said "Retrieves a list of available prompts" — corrected to "Retrieves a specific prompt from the MCP server"
  • SubscribeToResourceAsync(Uri, ...): summary said "Unsubscribes from a resource" and param said "to which to subscribe" — corrected to match the other SubscribeToResourceAsync overloads
Original prompt

Problem

src/ModelContextProtocol.Core/Client/McpClient.Methods.cs has several incorrect XML documentation comments:

Fix 1 — SubscribeToResourceAsync(Uri, ...) (around line 551–560)

The <summary> for the SubscribeToResourceAsync(Uri uri, ...) overload incorrectly reads:

/// <summary>
/// Unsubscribes from a resource on the server to stop receiving notifications about its changes.
/// </summary>
/// <param name="uri">The URI of the resource to which to subscribe.</param>

This is a subscribe method, not an unsubscribe method. The summary should match the other SubscribeToResourceAsync overloads, e.g.:

/// <summary>
/// Subscribes to a resource on the server to receive notifications when it changes.
/// </summary>
/// <param name="uri">The URI of the resource to subscribe to.</param>

Fix 2 — GetPromptAsync(GetPromptRequestParams, ...) (around line 282–302)

The <summary> for the GetPromptAsync(GetPromptRequestParams requestParams, ...) overload incorrectly reads:

/// <summary>
/// Retrieves a list of available prompts from the server.
/// </summary>

This is the raw-params overload of GetPromptAsync — it retrieves a single specific prompt, not a list of prompts. The summary should be corrected to something like:

/// <summary>
/// Retrieves a specific prompt from the MCP server.
/// </summary>

Please fix both of these doc comment issues. Do not change any code logic, only the XML documentation comments.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix incorrect XML documentation comments in McpClient Fix incorrect XML doc comments in McpClient.Methods.cs Feb 20, 2026
@stephentoub stephentoub marked this pull request as ready for review February 20, 2026 21:51
@stephentoub stephentoub enabled auto-merge (squash) February 20, 2026 21:52
@stephentoub stephentoub merged commit 026bf1d into main Feb 21, 2026
10 checks passed
@stephentoub stephentoub deleted the copilot/fix-xml-documentation-comments branch February 21, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants