Add and augment conceptual docs#1375
Conversation
…, transports, ping, cancellation, pagination, and capabilities Address documentation gaps identified in SDK conformance assessment: - 14 FAIL and 17 PARTIAL features now documented - New docs cover content types, change notifications, subscriptions, templates, pagination, and capability negotiation - Updated elicitation doc with default values and enum schema formats - Reorganized toc.yml and index.md with categorized navigation - All code snippets verified against SDK compilation Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive conceptual documentation for the MCP C# SDK, addressing gaps identified in the SDK conformance assessment. The new documentation covers transport configuration, server features (tools, resources, prompts, completions), client features (roots, elicitation), and base protocol features (capabilities, pagination, cancellation, ping).
Changes:
- Added 10 new conceptual documentation files covering transports, tools, resources, prompts, roots, ping, pagination, completions, capabilities, and cancellation
- Enhanced elicitation documentation with default values and enum schema format details
- Reorganized navigation structure in toc.yml and index.md with categorized sections for Base Protocol, Client Features, and Server Features
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/concepts/transports/transports.md | Documents stdio, Streamable HTTP, and SSE transport configuration with code examples |
| docs/concepts/tools/tools.md | Covers tool implementation, content types (text, image, audio, embedded resources), and change notifications |
| docs/concepts/resources/resources.md | Explains resource implementation, URI templates, subscriptions, and change notifications |
| docs/concepts/prompts/prompts.md | Documents prompt templates, rich content types, and prompt list change notifications |
| docs/concepts/roots/roots.md | Describes filesystem roots feature for client-server context sharing |
| docs/concepts/ping/ping.md | Covers connection health monitoring using ping mechanism |
| docs/concepts/pagination/pagination.md | Explains cursor-based pagination for list operations |
| docs/concepts/completions/completions.md | Documents argument auto-completion for prompts and resource templates |
| docs/concepts/capabilities/capabilities.md | Covers capability and protocol version negotiation during initialization |
| docs/concepts/cancellation/cancellation.md | Explains request cancellation using CancellationToken and notifications |
| docs/concepts/elicitation/elicitation.md | Updated with default values and enum schema format examples |
| docs/concepts/index.md | Reorganized with categorized navigation (Base Protocol, Client Features, Server Features) |
| docs/concepts/toc.yml | Updated table of contents with new documentation pages organized by category |
- New docs/concepts/sampling/sampling.md covering server-side SampleAsync and AsSamplingChatClient, client-side CreateSamplingHandler and custom SamplingHandler delegate, and capability negotiation - Add error handling section to docs/concepts/tools/tools.md with examples for automatic exception handling, McpProtocolException, and client-side IsError checking - Add SSE server code example to docs/concepts/transports/transports.md - Add sampling link to docs/concepts/index.md Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- Minimize cancellation doc to focus on MCP protocol behavior, not CancellationToken patterns - Simplify ping doc to a single API call example - Soften capabilities overview to not prescribe initialize handshake steps - Remove enum row from JSON Schema type mapping table - Replace file path examples with ID-based lookups to avoid path traversal - Use BlobResourceContents.FromBytes() factory consistently - Switch inline markdown links to reference-style Co-authored-by: Copilot <[email protected]>
mikekistler
left a comment
There was a problem hiding this comment.
This doc is awesome! 👍
I left two minor comments, but overall this is a great uplevel of our conceptual docs.
- Add bulleted lists of all definition methods for tools, prompts, resources (attribute, Create factory, deriving, custom handler, request filter) - Note DataContent from M.E.AI mapping to content blocks in tools and prompts - Simplify roots example by removing unnecessary explicit capability config - Add special parameter types note (McpServer, IProgress, ClaimsPrincipal, DI) - Mention message filters for cancellation notification interception - Use tool.CallAsync pattern in client tool consumption example - Merge redundant intro in capabilities.md - Simplify elicitation EnumSchemaOption syntax and remove auto-fill claim - Simplify prompts intro text Co-authored-by: Copilot <[email protected]>
Co-authored-by: Mike Kistler <[email protected]> Co-authored-by: Stephen Toub <[email protected]>
Replace dotnet run --project example with dnx NuGet.Mcp.Server to demonstrate connecting to a published NuGet MCP server package. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
halter73
left a comment
There was a problem hiding this comment.
This looks really good. I think all of my comments could be addressed in follow up PRs if we decide it's worthwhile.
Co-authored-by: Stephen Halter <[email protected]>
46668f1
into
modelcontextprotocol:main
Address documentation gaps identified in SDK conformance assessment: