diff --git a/src/ModelContextProtocol.Core/Client/McpClient.Methods.cs b/src/ModelContextProtocol.Core/Client/McpClient.Methods.cs
index b96f5ef..fc453d0 100644
--- a/src/ModelContextProtocol.Core/Client/McpClient.Methods.cs
+++ b/src/ModelContextProtocol.Core/Client/McpClient.Methods.cs
@@ -131,39 +131,6 @@ public abstract partial class McpClient : McpSession
return tools;
}
- ///
- /// Creates an enumerable for asynchronously enumerating all available tools from the server.
- ///
- /// The serializer options governing tool parameter serialization. If null, the default options are used.
- /// The to monitor for cancellation requests. The default is .
- /// An asynchronous sequence of all available tools as instances.
- public async IAsyncEnumerable EnumerateToolsAsync(
- JsonSerializerOptions? serializerOptions = null,
- [EnumeratorCancellation] CancellationToken cancellationToken = default)
- {
- serializerOptions ??= McpJsonUtilities.DefaultOptions;
- serializerOptions.MakeReadOnly();
-
- string? cursor = null;
- do
- {
- var toolResults = await SendRequestAsync(
- RequestMethods.ToolsList,
- new() { Cursor = cursor },
- McpJsonUtilities.JsonContext.Default.ListToolsRequestParams,
- McpJsonUtilities.JsonContext.Default.ListToolsResult,
- cancellationToken: cancellationToken).ConfigureAwait(false);
-
- foreach (var tool in toolResults.Tools)
- {
- yield return new McpClientTool(this, tool, serializerOptions);
- }
-
- cursor = toolResults.NextCursor;
- }
- while (cursor is not null);
- }
-
///
/// Retrieves a list of available prompts from the server.
///
@@ -196,34 +163,6 @@ public abstract partial class McpClient : McpSession
return prompts;
}
- ///
- /// Creates an enumerable for asynchronously enumerating all available prompts from the server.
- ///
- /// The to monitor for cancellation requests. The default is .
- /// An asynchronous sequence of all available prompts as instances.
- public async IAsyncEnumerable EnumeratePromptsAsync(
- [EnumeratorCancellation] CancellationToken cancellationToken = default)
- {
- string? cursor = null;
- do
- {
- var promptResults = await SendRequestAsync(
- RequestMethods.PromptsList,
- new() { Cursor = cursor },
- McpJsonUtilities.JsonContext.Default.ListPromptsRequestParams,
- McpJsonUtilities.JsonContext.Default.ListPromptsResult,
- cancellationToken: cancellationToken).ConfigureAwait(false);
-
- foreach (var prompt in promptResults.Prompts)
- {
- yield return new(this, prompt);
- }
-
- cursor = promptResults.NextCursor;
- }
- while (cursor is not null);
- }
-
///
/// Retrieves a specific prompt from the MCP server.
///
@@ -284,34 +223,6 @@ public abstract partial class McpClient : McpSession
return resourceTemplates;
}
- ///
- /// Creates an enumerable for asynchronously enumerating all available resource templates from the server.
- ///
- /// The to monitor for cancellation requests. The default is .
- /// An asynchronous sequence of all available resource templates as instances.
- public async IAsyncEnumerable EnumerateResourceTemplatesAsync(
- [EnumeratorCancellation] CancellationToken cancellationToken = default)
- {
- string? cursor = null;
- do
- {
- var templateResults = await SendRequestAsync(
- RequestMethods.ResourcesTemplatesList,
- new() { Cursor = cursor },
- McpJsonUtilities.JsonContext.Default.ListResourceTemplatesRequestParams,
- McpJsonUtilities.JsonContext.Default.ListResourceTemplatesResult,
- cancellationToken: cancellationToken).ConfigureAwait(false);
-
- foreach (var templateResult in templateResults.ResourceTemplates)
- {
- yield return new McpClientResourceTemplate(this, templateResult);
- }
-
- cursor = templateResults.NextCursor;
- }
- while (cursor is not null);
- }
-
///
/// Retrieves a list of available resources from the server.
///
@@ -345,34 +256,6 @@ public abstract partial class McpClient : McpSession
return resources;
}
- ///
- /// Creates an enumerable for asynchronously enumerating all available resources from the server.
- ///
- /// The to monitor for cancellation requests. The default is .
- /// An asynchronous sequence of all available resources as instances.
- public async IAsyncEnumerable EnumerateResourcesAsync(
- [EnumeratorCancellation] CancellationToken cancellationToken = default)
- {
- string? cursor = null;
- do
- {
- var resourceResults = await SendRequestAsync(
- RequestMethods.ResourcesList,
- new() { Cursor = cursor },
- McpJsonUtilities.JsonContext.Default.ListResourcesRequestParams,
- McpJsonUtilities.JsonContext.Default.ListResourcesResult,
- cancellationToken: cancellationToken).ConfigureAwait(false);
-
- foreach (var resource in resourceResults.Resources)
- {
- yield return new McpClientResource(this, resource);
- }
-
- cursor = resourceResults.NextCursor;
- }
- while (cursor is not null);
- }
-
///
/// Reads a resource from the server.
///
diff --git a/src/ModelContextProtocol.Core/Client/McpClientPrompt.cs b/src/ModelContextProtocol.Core/Client/McpClientPrompt.cs
index 354cd31..c76d922 100644
--- a/src/ModelContextProtocol.Core/Client/McpClientPrompt.cs
+++ b/src/ModelContextProtocol.Core/Client/McpClientPrompt.cs
@@ -10,8 +10,7 @@ namespace ModelContextProtocol.Client;
///
/// This class provides a client-side wrapper around a prompt defined on an MCP server. It allows
/// retrieving the prompt's content by sending a request to the server with optional arguments.
-/// Instances of this class are typically obtained by calling
-/// or .
+/// Instances of this class are typically obtained by calling .
///
///
/// Each prompt has a name and optionally a description, and it can be invoked with arguments
diff --git a/src/ModelContextProtocol.Core/Client/McpClientResource.cs b/src/ModelContextProtocol.Core/Client/McpClientResource.cs
index fe3fb1c..297adda 100644
--- a/src/ModelContextProtocol.Core/Client/McpClientResource.cs
+++ b/src/ModelContextProtocol.Core/Client/McpClientResource.cs
@@ -9,8 +9,7 @@ namespace ModelContextProtocol.Client;
///
/// This class provides a client-side wrapper around a resource defined on an MCP server. It allows
/// retrieving the resource's content by sending a request to the server with the resource's URI.
-/// Instances of this class are typically obtained by calling
-/// or .
+/// Instances of this class are typically obtained by calling .
///
///
public sealed class McpClientResource
diff --git a/src/ModelContextProtocol.Core/Client/McpClientResourceTemplate.cs b/src/ModelContextProtocol.Core/Client/McpClientResourceTemplate.cs
index ddbdfe1..14d25f9 100644
--- a/src/ModelContextProtocol.Core/Client/McpClientResourceTemplate.cs
+++ b/src/ModelContextProtocol.Core/Client/McpClientResourceTemplate.cs
@@ -9,8 +9,7 @@ namespace ModelContextProtocol.Client;
///
/// This class provides a client-side wrapper around a resource template defined on an MCP server. It allows
/// retrieving the resource template's content by sending a request to the server with the resource's URI.
-/// Instances of this class are typically obtained by calling
-/// or .
+/// Instances of this class are typically obtained by calling .
///
///
public sealed class McpClientResourceTemplate
diff --git a/src/ModelContextProtocol.Core/Client/McpClientTool.cs b/src/ModelContextProtocol.Core/Client/McpClientTool.cs
index d076082..5674bc4 100644
--- a/src/ModelContextProtocol.Core/Client/McpClientTool.cs
+++ b/src/ModelContextProtocol.Core/Client/McpClientTool.cs
@@ -20,7 +20,7 @@ namespace ModelContextProtocol.Client;
///
///
/// Typically, you would get instances of this class by calling the
-/// or extension methods on an instance.
+/// method on an instance.
///
///
public sealed class McpClientTool : AIFunction
diff --git a/tests/ModelContextProtocol.Tests/Client/McpClientTests.cs b/tests/ModelContextProtocol.Tests/Client/McpClientTests.cs
index 604c31b..18cb1a7 100644
--- a/tests/ModelContextProtocol.Tests/Client/McpClientTests.cs
+++ b/tests/ModelContextProtocol.Tests/Client/McpClientTests.cs
@@ -286,55 +286,6 @@ public class McpClientTests : ClientServerTestBase
Assert.False(valuesSetViaOptions.ProtocolTool.Annotations?.OpenWorldHint);
}
- [Fact]
- public async Task EnumerateToolsAsync_AllToolsReturned()
- {
- await using McpClient client = await CreateMcpClientForServer();
-
- await foreach (var tool in client.EnumerateToolsAsync(cancellationToken: TestContext.Current.CancellationToken))
- {
- if (tool.Name == "Method4")
- {
- var result = await tool.InvokeAsync(new() { ["i"] = 42 }, TestContext.Current.CancellationToken);
- Assert.Contains("Method4 Result 42", result?.ToString());
- return;
- }
- }
-
- Assert.Fail("Couldn't find target method");
- }
-
- [Fact]
- public async Task EnumerateToolsAsync_FlowsJsonSerializerOptions()
- {
- JsonSerializerOptions options = new(JsonSerializerOptions.Default);
- await using McpClient client = await CreateMcpClientForServer();
- bool hasTools = false;
-
- await foreach (var tool in client.EnumerateToolsAsync(options, TestContext.Current.CancellationToken))
- {
- Assert.Same(options, tool.JsonSerializerOptions);
- hasTools = true;
- }
-
- foreach (var tool in await client.ListToolsAsync(options, TestContext.Current.CancellationToken))
- {
- Assert.Same(options, tool.JsonSerializerOptions);
- }
-
- Assert.True(hasTools);
- }
-
- [Fact]
- public async Task EnumerateToolsAsync_HonorsJsonSerializerOptions()
- {
- JsonSerializerOptions emptyOptions = new() { TypeInfoResolver = JsonTypeInfoResolver.Combine() };
- await using McpClient client = await CreateMcpClientForServer();
-
- var tool = (await client.ListToolsAsync(emptyOptions, TestContext.Current.CancellationToken)).First();
- await Assert.ThrowsAsync(async () => await tool.InvokeAsync(new() { ["i"] = 42 }, TestContext.Current.CancellationToken));
- }
-
[Fact]
public async Task SendRequestAsync_HonorsJsonSerializerOptions()
{