Align sampling specification XML docs with spec revision d165cd6#1293
Merged
stephentoub merged 3 commits intomainfrom Feb 17, 2026
Merged
Align sampling specification XML docs with spec revision d165cd6#1293stephentoub merged 3 commits intomainfrom
stephentoub merged 3 commits intomainfrom
Conversation
- Update Temperature property with detailed description of randomness control and client MAY modify/ignore - Fix MaxTokens property to indicate client MUST respect this parameter (removed contradictory remark) - Add remark to StopSequences noting client MAY modify or ignore - Add remark to Metadata noting client MAY modify or ignore - Add remark to Messages about not retaining messages between requests - Update CreateMessageResult.StopReason endTurn description to match spec wording Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update XML doc comments for MCP specification
Align sampling specification XML docs with spec revision d165cd6
Feb 17, 2026
stephentoub
approved these changes
Feb 17, 2026
| /// response length and computation time. | ||
| /// </para> | ||
| /// <para> | ||
| /// The client MUST respect the <see cref="MaxTokens"/> parameter. |
Contributor
There was a problem hiding this comment.
@copilot it's ok for the client to send fewer. I'm not sure why you removed the existing comment. Also the MUST shouldn't be capitalized
Contributor
Author
There was a problem hiding this comment.
Fixed in 086408a - restored the original comment about client choosing fewer tokens and changed capitalization to lowercase "must"
| /// Gets or sets the messages requested by the server to be included in the prompt. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// The list of messages in a sampling request SHOULD NOT be retained between separate requests. |
Contributor
There was a problem hiding this comment.
@copilot here as well and anywhere sense you do it, don't capitalize with all caps like this
Contributor
Author
There was a problem hiding this comment.
Fixed in 086408a - changed all RFC 2119 keywords (MUST, SHOULD NOT, MAY) to lowercase throughout the file
- Restore original MaxTokens comment about client choosing fewer tokens - Change all-caps RFC 2119 keywords (MUST, SHOULD NOT, MAY) to lowercase (must, should not, may) Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
halter73
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MCP spec was revised to clarify client obligations for sampling parameters. The SDK implementation is correct, but XML docs needed updates.
Changes Made
MaxTokens- Clarified that the client must respectmaxTokensas a limit, while noting the client can choose to sample fewer tokens than requested.Temperature- Documented randomness control behavior and that client may modify/ignoreStopSequences,Metadata- Added that client may modify/ignore these parametersMessages- Noted that message lists should not be retained between separate sampling requestsStopReason.endTurn- Updated description to "participant is yielding the conversation" per spec wordingStyle
All RFC 2119 keywords (must, should not, may) use lowercase in XML documentation comments per SDK conventions.
Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.