Skip to content

Commit 4dbb5c7

Browse files
committed
Add note about SSE stream management
1 parent 5cafa6d commit 4dbb5c7

File tree

1 file changed

+11
-0
lines changed
  • docs/specification/draft/basic/utilities

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,17 @@ stateDiagram-v2
414414

415415
### Input Required Status
416416

417+
<Note>
418+
419+
In the Streamable HTTP (SSE) transport, it is common for servers to close SSE streams upon sending a response message, rendering the stream that task messages will be sent on ambiguous.
420+
421+
Implementations have flexibility in how they manage SSE streams during task polling and result retrieval.
422+
Possible approaches include using short-lived streams for each `tasks/get` request or maintaining a longer-lived stream on `tasks/result` (see notes on the `input_required` status), among others.
423+
424+
While this note is not prescriptive regarding the specific usage of SSE streams, all implementations **MUST** continue to comply with the existing [Streamable HTTP transport specification](../transports#sending-messages-to-the-server).
425+
426+
</Note>
427+
417428
1. When the task receiver has messages for the requestor that are necessary to complete the task, the receiver **SHOULD** move the task to the `input_required` status.
418429
1. The receiver **MUST** include the `modelcontextprotocol.io/related-task` metadata in the request to associate it with the task.
419430
1. When the requestor encounters the `input_required` status, it **SHOULD** call `tasks/result` prematurely.

0 commit comments

Comments
 (0)