You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ModelContextProtocol.Core/Client/McpClient.Methods.cs
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -280,7 +280,7 @@ public ValueTask<GetPromptResult> GetPromptAsync(
280
280
}
281
281
282
282
/// <summary>
283
-
/// Retrieves a list of available prompts from the server.
283
+
/// Retrieves a specific prompt from the MCP server.
284
284
/// </summary>
285
285
/// <param name="requestParams">The request parameters to send in the request.</param>
286
286
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
@@ -549,9 +549,9 @@ public ValueTask<CompleteResult> CompleteAsync(
549
549
}
550
550
551
551
/// <summary>
552
-
/// Unsubscribes from a resource on the server to stop receiving notifications about its changes.
552
+
/// Subscribes to a resource on the server to receive notifications when it changes.
553
553
/// </summary>
554
-
/// <param name="uri">The URI of the resource to which to subscribe.</param>
554
+
/// <param name="uri">The URI of the resource to subscribe to.</param>
555
555
/// <param name="options">Optional request options including metadata, serialization settings, and progress tracking.</param>
556
556
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
557
557
/// <returns>A task that represents the asynchronous operation.</returns>
@@ -1073,6 +1074,7 @@ public async ValueTask<McpTask> GetTaskAsync(
1073
1074
/// <returns>The raw JSON result of the task.</returns>
1074
1075
/// <exception cref="ArgumentNullException"><paramref name="taskId"/> is <see langword="null"/>.</exception>
1075
1076
/// <exception cref="ArgumentException"><paramref name="taskId"/> is empty or composed entirely of whitespace.</exception>
1077
+
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
1076
1078
/// <remarks>
1077
1079
/// This method sends a tasks/result request to the server, which will block until the task completes if it hasn't already.
1078
1080
/// The server handles all polling logic internally.
@@ -1099,6 +1101,7 @@ public ValueTask<JsonElement> GetTaskResultAsync(
1099
1101
/// <param name="options">Optional request options including metadata, serialization settings, and progress tracking.</param>
1100
1102
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
1101
1103
/// <returns>A list of all tasks.</returns>
1104
+
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
@@ -1124,6 +1127,7 @@ public async ValueTask<IList<McpTask>> ListTasksAsync(
1124
1127
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
1125
1128
/// <returns>The result of the request as provided by the server.</returns>
1126
1129
/// <exception cref="ArgumentNullException"><paramref name="requestParams"/> is <see langword="null"/>.</exception>
1130
+
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
1127
1131
/// <remarks>
1128
1132
/// The <see cref="ListTasksAsync(RequestOptions?, CancellationToken)"/> overload retrieves all tasks by automatically handling pagination.
1129
1133
/// This overload works with the lower-level <see cref="ListTasksRequestParams"/> and <see cref="ListTasksResult"/>, returning the raw result from the server.
@@ -1153,6 +1157,7 @@ public ValueTask<ListTasksResult> ListTasksAsync(
1153
1157
/// <returns>The updated state of the task after cancellation.</returns>
1154
1158
/// <exception cref="ArgumentNullException"><paramref name="taskId"/> is <see langword="null"/>.</exception>
1155
1159
/// <exception cref="ArgumentException"><paramref name="taskId"/> is empty or composed entirely of whitespace.</exception>
1160
+
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
1156
1161
/// <remarks>
1157
1162
/// Cancelling a task requests that the server stop execution. The server may not immediately cancel the task,
1158
1163
/// and may choose to allow the task to complete if it's close to finishing.
private sealed class InnerResource(ResourceTemplateprotocolResourceTemplate,ResourceprotocolResource,IReadOnlyList<object>metadata,ReadResourceResultresult):McpServerResource
0 commit comments