Skip to content

Commit c17be74

Browse files
Merge pull request modelcontextprotocol#1857 from LucaButBoring/chore/task-sse-clarification
Make SSE stream management slightly more explicit for tasks
2 parents b7e43a7 + db0df22 commit c17be74

File tree

1 file changed

+3
-1
lines changed
  • docs/specification/draft/basic/utilities

1 file changed

+3
-1
lines changed

docs/specification/draft/basic/utilities/tasks.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@ stateDiagram-v2
430430

431431
With the Streamable HTTP (SSE) transport, servers often close SSE streams after delivering a response message, which can lead to ambiguity regarding the stream used for subsequent task messages.
432432

433-
Implementations have flexibility in how they manage SSE streams during task polling and result retrieval.
433+
Servers can handle this by enqueueing messages to the client to side-channel task-related messages alongside other responses.
434+
435+
Servers have flexibility in how they manage SSE streams during task polling and result retrieval, and clients **SHOULD** expect messages to be delivered on any SSE stream, including the HTTP GET stream.
434436
One possible approach is maintaining an SSE stream on `tasks/result` (see notes on the `input_required` status).
435437
Where possible, servers **SHOULD NOT** upgrade to an SSE stream in response to a `tasks/get` request, as the client has indicated it wishes to poll for a result.
436438

0 commit comments

Comments
 (0)