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
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -172,6 +172,12 @@ public ValueTask<PingResult> PingAsync(
172
172
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
173
173
/// <returns>A list of all available tools as <see cref="McpClientTool"/> instances.</returns>
174
174
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
175
+
/// <remarks>
176
+
/// This overload aggregates every page into a single list and does not surface the per-result caching hints
177
+
/// (<see cref="ListToolsResult.TimeToLive"/> and <see cref="ListToolsResult.CacheScope"/>). To read those hints,
178
+
/// use the <see cref="ListToolsAsync(ListToolsRequestParams, CancellationToken)"/> overload, which returns the
179
+
/// raw <see cref="ListToolsResult"/> for each page.
@@ -256,6 +262,12 @@ public ValueTask<ListToolsResult> ListToolsAsync(
256
262
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
257
263
/// <returns>A list of all available prompts as <see cref="McpClientPrompt"/> instances.</returns>
258
264
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
265
+
/// <remarks>
266
+
/// This overload aggregates every page into a single list and does not surface the per-result caching hints
267
+
/// (<see cref="ListPromptsResult.TimeToLive"/> and <see cref="ListPromptsResult.CacheScope"/>). To read those hints,
268
+
/// use the <see cref="ListPromptsAsync(ListPromptsRequestParams, CancellationToken)"/> overload, which returns the
269
+
/// raw <see cref="ListPromptsResult"/> for each page.
@@ -366,6 +378,12 @@ public ValueTask<GetPromptResult> GetPromptAsync(
366
378
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
367
379
/// <returns>A list of all available resource templates as <see cref="ResourceTemplate"/> instances.</returns>
368
380
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
381
+
/// <remarks>
382
+
/// This overload aggregates every page into a single list and does not surface the per-result caching hints
383
+
/// (<see cref="ListResourceTemplatesResult.TimeToLive"/> and <see cref="ListResourceTemplatesResult.CacheScope"/>). To read those hints,
384
+
/// use the <see cref="ListResourceTemplatesAsync(ListResourceTemplatesRequestParams, CancellationToken)"/> overload, which returns the
385
+
/// raw <see cref="ListResourceTemplatesResult"/> for each page.
@@ -422,6 +440,12 @@ public ValueTask<ListResourceTemplatesResult> ListResourceTemplatesAsync(
422
440
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
423
441
/// <returns>A list of all available resources as <see cref="Resource"/> instances.</returns>
424
442
/// <exception cref="McpException">The request failed or the server returned an error response.</exception>
443
+
/// <remarks>
444
+
/// This overload aggregates every page into a single list and does not surface the per-result caching hints
445
+
/// (<see cref="ListResourcesResult.TimeToLive"/> and <see cref="ListResourcesResult.CacheScope"/>). To read those hints,
446
+
/// use the <see cref="ListResourcesAsync(ListResourcesRequestParams, CancellationToken)"/> overload, which returns the
447
+
/// raw <see cref="ListResourcesResult"/> for each page.
0 commit comments