Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Refine 2.0.0 concept documentation - #1742

#1742
Merged
jeffhandley merged 10 commits into
mainmodelcontextprotocol/csharp-sdk:mainfrom
jeffhandley/refine-2-0-docsmodelcontextprotocol/csharp-sdk:jeffhandley/refine-2-0-docsCopy head branch name to clipboard
Jul 28, 2026
Merged

Refine 2.0.0 concept documentation#1742
jeffhandley merged 10 commits into
mainmodelcontextprotocol/csharp-sdk:mainfrom
jeffhandley/refine-2-0-docsmodelcontextprotocol/csharp-sdk:jeffhandley/refine-2-0-docsCopy head branch name to clipboard

Conversation

@jeffhandley

@jeffhandley jeffhandley commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Documentation refinements for the 2.0.0 release: concept-doc corrections, a new Supporting down-level clients section for MRTR, navigation adjustments, and two corrections to the TasksExtension sample. Also incorporates review feedback from the PR discussion.

This is the first of two planned docs changes. A follow-up will introduce a compile-gated snippets project that transcludes all documentation code samples; it is parked separately so it can land cleanly on top of this once merged.

Concept documentation

  • tasks.md — restore the intended information architecture: move Compatibility with v1 experimental Tasks under Architecture notes (from a top-level section right after the intro to #### Compatibility with v1 experimental Tasks, after Capability bypass inside a task scope and before Known limitations).
  • capabilities.md — correct a client variable reference (mcpClientclient).
  • index.md — list Stateless and Stateful under Base protocol to match toc.yml.
  • getting-started.md, transports.md — standardize link text on Stateless and Stateful (the concept page's name) rather than Sessions.
  • sampling.md, roots.md, logging.md — add deprecation notices for the Roots/Sampling/Logging utilities (SEP-2577); for sampling and roots, point to the stateless-compatible Multi round-trip requests (MRTR) alternative.
  • list-of-diagnostics.md — link SEP-2577 from the MCP9005 row, and standardize the MCP9004 link text on Stateless and Stateful.
  • logging.md — correct the Trace-level note: LogLevel.Trace maps to the MCP debug level when sent to the client (McpServerImpl.ToLoggingLevel); it is not silently dropped.
  • Normalize stray trailing spaces in two docs-sample snippet markers.

MRTR — Supporting down-level clients

  • mrtr.md — add a Supporting down-level clients section with two strategies (Return actionable guidance and Offer a non-interactive fallback) and a non-destructive CloseSupportTicket sample. The sample elicits a required closeReason and demonstrates four client scenarios in a single tool: explicit up-front input, an MRTR round-trip response, an MRTR initial request (with the SDK's automatic down-level elicitation bridge on a stateful session), and a session-less down-level natural-language fallback. This mirrors the sample used in the v2.0 announcement blog post.

Navigation

  • concepts/toc.yml — add API Reference and Experimental APIs to the conceptual left-nav, after Extensions.
  • toc.yml — remove Experimental APIs from the top-nav.
  • versioning.md — add a See also section linking Experimental APIs and List of diagnostics.

TasksExtension sample

Validation

  • DocFX --warningsAsErrors: 0 warnings / 0 errors.
  • samples/TasksExtension builds clean and runs the poll loop to completion.
  • The CloseSupportTicket MRTR sample was validated over an HTTP harness across the full client/transport matrix (MRTR-capable and down-level clients; stateful and stateless transports), including the session-less down-level fallback path.

jeffhandley and others added 5 commits July 24, 2026 20:35
- tasks.md: restore the intended information architecture by moving the
  "Compatibility with v1 experimental Tasks" section under "Architecture notes".
- capabilities.md: correct the client variable reference (mcpClient -> client).
- index.md: list "Stateless and Stateful" under Base protocol to match toc.yml.
- getting-started.md, transports.md: standardize link text on
  "Stateless and Stateful" (the concept page's name) rather than "Sessions".
- sampling.md, roots.md, logging.md: add deprecation notices for the
  Roots/Sampling/Logging utilities (SEP-2577); for sampling and roots, point to
  the stateless-compatible Multi round-trip requests (MRTR) alternative.
- list-of-diagnostics.md: link SEP-2577 from the MCP9005 row.
- logging.md: correct the Trace-level note. Trace maps to the MCP `debug` level
  when sent to the client; it is not silently dropped
  (McpServerImpl.ToLoggingLevel: LogLevel.Trace => LoggingLevel.Debug).
- Normalize stray trailing spaces in two docs-sample snippet markers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 782b5bad-4046-49ec-93a6-72768b5b7521
…verTransport

The sample registered the in-memory pipe transport by adding an ITransport
singleton directly, which does not register the McpServer factory in DI. As a
result, serviceProvider.GetRequiredService<McpServer>() threw
"No service for type 'ModelContextProtocol.Server.McpServer' has been registered."
at startup (regression from the Tasks extraction, #1693).

Register the transport through .WithStreamServerTransport(...) on the builder,
which calls AddSingleSessionServerDependencies and registers the McpServer
factory. The sample now runs the task poll loop to completion.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b938335-418c-4ee7-8287-6c70d9148b89
The README described a pre-#1693 two-path client (CallToolAsync auto-poll +
CallToolRawAsync manual poll) that no longer exists. Program.cs demonstrates a
single CallToolAsTaskAsync manual-poll path. Update the prose and the expected
output block to match the current sample.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b938335-418c-4ee7-8287-6c70d9148b89
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread docs/list-of-diagnostics.md Outdated
tarekgh
tarekgh previously approved these changes Jul 27, 2026

@tarekgh tarekgh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Address PR review feedback: the MCP9004 row linked [Stateless — Legacy SSE transport], but this PR standardizes the link text on "Stateless and Stateful" (the concept page's name) elsewhere. Rename to match.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 782b5bad-4046-49ec-93a6-72768b5b7521
halter73
halter73 previously approved these changes Jul 28, 2026
Comment thread docs/concepts/mrtr/mrtr.md Outdated
Comment thread samples/TasksExtension/README.md
jeffhandley and others added 3 commits July 27, 2026 17:37
Replace the DeleteFile down-level confirmation example with a CloseSupportTicket example that matches the sample used in the accompanying blog post. The API surface is unchanged (InputRequiredException + InputRequest.ForElicitation, branching on the elicitation action via ElicitResult.IsAccepted); only the illustrative domain changes to a non-destructive action.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 782b5bad-4046-49ec-93a6-72768b5b7521
Address PR review feedback: the note singled out MCPEXP001, but the sample's Program.cs now suppresses MCPEXP001, MCPEXP002, and MCPEXP004, and the suppression mechanism is already self-documented by the project's <NoWarn> and the pragma. Drop the redundant note; keep the durable IMcpTaskStore guidance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 782b5bad-4046-49ec-93a6-72768b5b7521
Evolve the down-level fallback sample from a boolean confirmation to a
required closeReason string. The server proposes a default reason
("completed") in the elicitation schema and branches on the elicitation
action via ElicitResult.IsAccepted, so a decline or cancel leaves the
ticket open. Behavior validated across the full matrix: native MRTR over
stateless HTTP, the legacy elicitation bridge over stateful HTTP, and the
stateless down-level guidance path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 782b5bad-4046-49ec-93a6-72768b5b7521
@jeffhandley
jeffhandley dismissed stale reviews from halter73 and PranavSenthilnathan via 52ab6aa July 28, 2026 02:28
Add API Reference and Experimental APIs to the conceptual left-nav (after
Extensions), remove Experimental APIs from the top-nav, and add a See also
section to the Versioning page linking Experimental APIs and List of
diagnostics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 782b5bad-4046-49ec-93a6-72768b5b7521
@jeffhandley
jeffhandley merged commit 314bdb2 into main Jul 28, 2026
11 checks passed
@jeffhandley
jeffhandley deleted the jeffhandley/refine-2-0-docs branch July 28, 2026 03:15
@jeffhandley jeffhandley mentioned this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.