-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SEP-1686: Tasks #1732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
localden
merged 90 commits into
modelcontextprotocol:main
from
LucaButBoring:feat/tasks
Nov 14, 2025
Merged
SEP-1686: Tasks #1732
Changes from all commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
08116ac
Write specification for SEP-1686: Tasks
LucaButBoring 74ba344
Write schema for task-related types
LucaButBoring d52881b
Add a mention of tasks to the Primitives docs
LucaButBoring 6444eb3
Make task idempotency a MAY instead of a MUST
LucaButBoring 42a4e5b
Add consistency requirement that tasks/list reflect tasks/get
LucaButBoring 1a4e205
Add capabilities and annotations for tasks
LucaButBoring cd7c4cd
Commit updated schema
LucaButBoring 726a4db
Add tasks/delete operation
LucaButBoring 7585a33
Move task-augmentation capabilities under tasks.requests for clarity
LucaButBoring bb707b1
Merge branch 'main' into feat/tasks
LucaButBoring a0b93c8
Clarify that failed status refers to lifecycle
LucaButBoring 81fd957
Specify that task methods themselves should not have related-task met…
LucaButBoring c0260cc
Rename pollFrequency to pollInterval
LucaButBoring 5e53553
Document input_required status in data types
LucaButBoring e4e2a08
Add capability for augmenting tasks/delete itself with a task
LucaButBoring 2a9c374
Receiver SHOULD move tasks to input_required
LucaButBoring 458571f
Merge branch 'main' of https://github.com/modelcontextprotocol/modelc…
LucaButBoring e57ea31
Fix input_required and failed status descriptions
LucaButBoring 97fcd60
Add optional status notifications for tasks
LucaButBoring 2b9c6da
Format docs
LucaButBoring 9b717e2
Make "failed" reflect the request error
LucaButBoring 6abc9bb
Merge branch 'main' into feat/tasks
LucaButBoring 96b8d49
Fix empty result type
LucaButBoring 0394a5d
Restrict tasks to tools/call, elicitation/create, and sampling/create…
LucaButBoring f7229a5
Add capabilities for tasks/list and tasks/delete
LucaButBoring 0ab6785
Use response instead of notification for task acceptance
LucaButBoring 2fdea38
Make task IDs exclusively server-generated
LucaButBoring e96ce21
Add stipulation that receivers are allowed to require tasks
LucaButBoring 642c3c7
Update tasks/result to block until completion
LucaButBoring 7d008e0
Add explicit note that tasks/result can return an error
LucaButBoring d05cfbb
Alter input_required to note tasks/result relation
LucaButBoring dbc2b0a
Remove submitted and unknown statuses
LucaButBoring 8169347
Update cancellation to reflect CreateTaskResult semantics
LucaButBoring 8a675ea
Update progress spec to reflect task semantics
LucaButBoring 43f9cf4
Merge branch 'main' into feat/tasks
LucaButBoring 33c3215
Merge branch 'main' into feat/tasks
LucaButBoring 13c6835
Add optional statusMessage field
LucaButBoring b9a9ac4
Remove cancellation changes and convert deletion into cancel RPC method
LucaButBoring aa0629a
Replace keepalive with TTL; add createdAt
LucaButBoring 7421af3
Merge branch 'main' into feat/tasks
LucaButBoring b9e04ad
Make CancelTaskResult include full task; loosen deletion reqs
LucaButBoring 6bcfab5
Rewrite access control section to explain session-binding
LucaButBoring 29fffbc
Make notifications include full task info
LucaButBoring bc12768
Add experimental notice
LucaButBoring b25069f
Link to task spec from progress
LucaButBoring ca166f3
Update task capabilities in lifecycle spec example
LucaButBoring fb7d063
Update changelog to include tasks
LucaButBoring 5cafa6d
Link to Progress spec from Tasks spec
LucaButBoring 4dbb5c7
Add note about SSE stream management
LucaButBoring 7da2b7f
Add note on metadata for immediate model responses
LucaButBoring 66b9872
Switch to reverse-DNS metadata prefixes
LucaButBoring a4f8c07
Revise immediate result note to clarify non-binding nature
LucaButBoring 60620cd
Fix minor issues
LucaButBoring e3dce0d
Clarify distinction between statusMessage and error fields
LucaButBoring 11bc887
Fix task capabilities in lifecycle docs again
LucaButBoring 68c0d63
Adjust cancellation spec to link to tasks spec for task cancellation
LucaButBoring 544c376
Remove related-task from responses that include the task ID already
LucaButBoring 4736c2e
Merge branch 'main' of https://github.com/modelcontextprotocol/modelc…
LucaButBoring 3c7e9e4
Remove notifications/tasks/created
LucaButBoring 07a3a32
Move task parameters to dedicated field
LucaButBoring aa79e44
Remove _meta from CreateTaskResult
LucaButBoring 9e5d23b
Clarify taskHint behavior
LucaButBoring 4508eb2
Update SSE recommendation for tasks in sHTTP
LucaButBoring 581d60c
Merge branch 'main' of https://github.com/modelcontextprotocol/modelc…
LucaButBoring 6c315d9
Merge branch 'main' into feat/tasks
LucaButBoring 3b3c583
Nest data inside of CreateTaskResult.task
LucaButBoring f9e4479
Merge branch 'main' of https://github.com/modelcontextprotocol/modelc…
LucaButBoring 29a1971
Apply grammatical fixes to tasks spec
LucaButBoring b0cb349
Add definitions section and fix grammar
LucaButBoring b94efec
Add capability tables for tasks
LucaButBoring 00566e2
Change taskHint to enum
LucaButBoring 93afbca
Specify taskHint values in spec
LucaButBoring 5ede2d9
Apply suggestions from code review
LucaButBoring 4776955
Link to RFC 3339 instead of Wikipedia for ISO 8601
LucaButBoring 861e4b8
Mark tasks as experimental in architecture docs
LucaButBoring a888e22
Application-driven -> requestor-driven
LucaButBoring 7ab865a
Fix inconsistency in task capabilities spec
LucaButBoring a3a6be4
Clarify task TTL definition
LucaButBoring 2943683
Minor task fixes
LucaButBoring b8ba4d5
Apply security changes from code review
LucaButBoring f104558
Remove session mentions in favor of auth
LucaButBoring fad5644
Remove `error` field in favor of `statusMessage`
LucaButBoring e397f5d
Clarify task polling under "Getting Tasks"
LucaButBoring 7604c82
Add a line explaining requestor-driven tasks
LucaButBoring 87e8d42
Add line on task use cases to spec
LucaButBoring 0f8aeb8
Merge branch 'main' into feat/tasks
LucaButBoring f41e5e3
Apply suggestions from code review
LucaButBoring 43113ab
Add missing link
LucaButBoring ba39ed7
Add missing link
LucaButBoring cbf3dca
Relax task augmentation with capabilities to "SHOULD", fix "task meta…
LucaButBoring File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be curious to better understand the meaning of the term "experimental" here. Does it suggest that the feature is subject to breaking revisions in the future? Should SDK implementers accordingly annotate all APIs touching task functionality as experimental?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears this line is answering my question: https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1732/files#diff-ce54e98f0e555c404f17c1180c4a65e774b0ed0ad71e207410030cf08356cf73R18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eiriktsarpalis Not sure how that clears up the meaning of "experimental" with regard to future breaking changes and necessity of SDK annotations. The line you linked to says:
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how that happened, I meant to link to this line: https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1732/files#diff-ce54e98f0e555c404f17c1180c4a65e774b0ed0ad71e207410030cf08356cf73R12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which means adding more features and SubTask support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe so, but if those additions are meant to be incremental I'm not sure why we'd want to qualify the feature as experimental.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The evolutions may not be purely incremental, but we'll see.
The request to mark this as experimental came out of the Core Maintainer reviews, and it's largely because we wanted to get this out in its current form for people to start building on, so we could get real, not-toy feedback on it in the coming months. We had been facing a chicken-and-egg problem over the past several months of discussions between getting this finalized and having people actually trial it in applications (huge thanks to @evalstate for being one of the few willing and able to, btw), which was something the Core Maintainers wanted to see to have confidence that this was definitely the right solution across the board.
I think that in particular, we want to avoid a situation like we have with
structuredOutput, where there have been divergences between implementations in SDKs and applications that have led to spotty support that isn't easy to resolve anymore. Releasing this in the upcoming spec release with an experimental label was the way we agreed to signpost the possibility of changing it in upcoming releases -- while simultaneously having enough "officiality" to get it into SDKs, so that people can actually build on it. That will give us a very high degree of confidence that the current core design is as good as it can be (short of net-new additions on top of it) and we can remove the experimental label.Simultaneously, I don't expect much to actually change in the core design, however. Consider it hedging, since this is such a large addition to MCP 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thank you all very much for your contributions. I'm currently developing a version (for Alibaba), and we also have similar requirements. Internally, we use various methods such as SSE, RocketMQ's litetopic, and asynchronous webhooks to achieve this. Within the company's network environment, we can also notify clients through other means. We've conducted some internal reviews based on this, and I think the current design is quite complete, at least it standardizes end-to-end behavior quite well.
While I don't know the actual implementation in your work, it will definitely involve databases and persistent message queue components to ensure the traceability of the entire task's state transition. For example, in our scenario, a heavy task might, after completion, notify our Agents system, allowing us to restart our agents either locally or on a different machine to continue processing.
I hope to deliver a version based on this first, thereby resolving internal interoperability issues. Deliver value first, then discuss improvements.