Resource capability (#5)

Prompt capability
Pagination support
This commit is contained in:
Peder Holdgaard Pedersen 2025-01-04 19:39:22 +01:00 • committed by GitHub
commit c9ace236a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@ For more information about MCP:
This project is in early development. While functional, it may undergo significant changes as the protocol and implementation evolve.
### Current Limitations
- Only supports the Tool capability (Resources, Prompts, Sampling, and Roots not yet implemented)
- Only supports the Tools, Resources, and Prompts capabilities (Sampling and Roots not yet implemented)
- Only stdio transport is currently supported (HTTP/SSE transport coming soon)
- Client library only - server implementation support may be added in the future
- Provider-agnostic implementation focused purely on the MCP protocol
@ -28,7 +28,8 @@ The library's current focus is on implementing the core MCP protocol, with the m
- MCP client implementation for .NET applications
- Support for stdio transport
- Tool discovery and execution
- Support for Tool, Resource, and Prompt capabilities
- Support for pagination and notifications
- Async/await pattern throughout
- Compatible with .NET 8.0 and later
@ -62,7 +63,7 @@ You can then retrieve an IMcpClient reference using the `id` of a server from th
```csharp
var client = await factory.GetClientAsync("everything");
// Get the list of tools, for passing to an LLM
var tools = await client.ListToolsAsync(CancellationToken.None);
var tools = await client.ListToolsAsync();
// Execute a tool, in practice this would normally be driven by LLM tool invocations
var result = await client.CallToolAsync(
"echo",
@ -76,7 +77,9 @@ var result = await client.CallToolAsync(
Console.WriteLine(result.Content.FirstOrDefault(c => c.Type == "text").Text);
```
Note that you should pass CancellationToken objects suitable for your use case, to enable proper error handling, timeouts, etc.
Note that you should pass CancellationToken objects suitable for your use case, to enable proper error handling, timeouts, etc. This example also does not paginate the tools list, which may be necessary for large tool sets. See the IntegrationTests project for an example of pagination, as well as examples of how to handle Prompts and Resources.
Additional examples and documentation will be added as in the near future.
## License