feat: add progress token support and extend Request interface#352
Closed
feat: add progress token support and extend Request interface#352
Conversation
- Add PaginatedRequest and ReadResourceRequest to Request sealed interface - Add default meta() and progressToken() methods to Request interface - Add _meta parameter support to request classes: - ReadResourceRequest, GetPromptRequest, CallToolRequest - CreateMessageRequest, ElicitRequest, CompleteRequest, PaginatedRequest - Add builder methods for progress token configuration - Add message field to ProgressNotification - Maintain backward compatibility with existing constructors Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This was referenced Jun 29, 2025
Closed
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
tzolov
added a commit
that referenced
this pull request
Jul 1, 2025
- Add PaginatedRequest and ReadResourceRequest to Request sealed interface - Add default meta() and progressToken() methods to Request interface - Add _meta parameter support to request classes: - ReadResourceRequest, GetPromptRequest, CallToolRequest - CreateMessageRequest, ElicitRequest, CompleteRequest, PaginatedRequest - Add builder methods for progress token configuration - Add message field to ProgressNotification - Maintain backward compatibility with existing constructors - Add _meta field to the InitialRequest record Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Contributor
Author
|
rebased and merged at c0b398c |
Closed
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.
Update
McpSchemato enable progress tracking capabilities for long-running MCP operations.Add progress token support and extend Request interface with meta parameter functionality. Related to the MCP Progression Specification
Related to #300, #351
Motivation and Context
This change updates the
McpSchemato provide the foundational schema support needed for progress tracking in long-running MCP operations. By adding meta parameter support and extending theRequestinterface, this enables future implementation of progress notifications for operations like resource reading, tool execution, and message creation. This schema update is a prerequisite for implementing progress tracking functionality that will improve user experience during long-running operations.How Has This Been Tested?
Breaking Changes
Yes, this contains breaking changes:
Sealed Interface Extension: Added
PaginatedRequestandReadResourceRequestto theRequestsealed interface permits list. This is a breaking change because:Requesttypes will need to handle the new casesRequestimplementations will need updatesRecommended Migration:
RequesttypesRequestimplementationsNon-breaking schema additions:
meta()andprogressToken()methods return null when not setTypes of changes
Checklist
Additional context
Schema Updates Overview:
This PR focuses solely on updating the
McpSchemaclass to provide the necessary schema foundation for progress tracking. The actual progress tracking implementation will be built on top of these schema changes.Key Schema Changes:
PaginatedRequestandReadResourceRequestto the sealed interface permits list_metafield support to all major request types for carrying progress tokens and other metadataprogressToken()method that extracts progress tokens from meta parametersmeta()andprogressToken()methods for fluent API usageProgressNotificationwith optionalmessagefield for contextual updatesMigration Guide:
For users with existing switch statements on
Requesttypes:Before:
After: