From 71f7c162e42ea1cd6ca88d83c70d89324fb6b0da Mon Sep 17 00:00:00 2001 From: Dale Seo <5466341+DaleSeo@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:19:34 -0400 Subject: [PATCH] docs: clarify subscription completion result --- .../2026-07-28/basic/patterns/subscriptions.mdx | 13 +++++++------ .../draft/basic/patterns/subscriptions.mdx | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/specification/2026-07-28/basic/patterns/subscriptions.mdx b/docs/specification/2026-07-28/basic/patterns/subscriptions.mdx index 866898e18..0349e28be 100644 --- a/docs/specification/2026-07-28/basic/patterns/subscriptions.mdx +++ b/docs/specification/2026-07-28/basic/patterns/subscriptions.mdx @@ -119,8 +119,8 @@ A subscription ends when: - The **client** cancels it — close the SSE stream (HTTP) or send `notifications/cancelled` referencing the `subscriptions/listen` request ID (stdio). -- The **server** tears it down (e.g., during shutdown) — it **SHOULD** send the - empty `subscriptions/listen` response to signal a graceful end (see +- The **server** tears it down (e.g., during shutdown) — it **SHOULD** send a + successful `subscriptions/listen` response to signal a graceful end (see [Graceful Closure](#graceful-closure)), then close the stream. - The underlying transport closes (HTTP timeout, TCP disconnect, stdio process exit). @@ -129,10 +129,11 @@ A subscription ends when: When the server ends a subscription on its own initiative (for example, during shutdown), it **SHOULD** respond to the original `subscriptions/listen` request -with an empty result before closing the stream. This is the JSON-RPC response to -the long-lived request, correlated by its `id`, and signals that the subscription -ended gracefully — as opposed to an abrupt transport drop, which carries no -response. +with a completion result before closing the stream. The result carries no +method-specific data beyond the standard result fields and subscription +metadata. This is the JSON-RPC response to the long-lived request, correlated by +its `id`, and signals that the subscription ended gracefully — as opposed to an +abrupt transport drop, which carries no response. ```json { diff --git a/docs/specification/draft/basic/patterns/subscriptions.mdx b/docs/specification/draft/basic/patterns/subscriptions.mdx index 298ee67ce..dbe064939 100644 --- a/docs/specification/draft/basic/patterns/subscriptions.mdx +++ b/docs/specification/draft/basic/patterns/subscriptions.mdx @@ -119,8 +119,8 @@ A subscription ends when: - The **client** cancels it — close the SSE stream (HTTP) or send `notifications/cancelled` referencing the `subscriptions/listen` request ID (stdio). -- The **server** tears it down (e.g., during shutdown) — it **SHOULD** send the - empty `subscriptions/listen` response to signal a graceful end (see +- The **server** tears it down (e.g., during shutdown) — it **SHOULD** send a + successful `subscriptions/listen` response to signal a graceful end (see [Graceful Closure](#graceful-closure)), then close the stream. - The underlying transport closes (HTTP timeout, TCP disconnect, stdio process exit). @@ -129,10 +129,11 @@ A subscription ends when: When the server ends a subscription on its own initiative (for example, during shutdown), it **SHOULD** respond to the original `subscriptions/listen` request -with an empty result before closing the stream. This is the JSON-RPC response to -the long-lived request, correlated by its `id`, and signals that the subscription -ended gracefully — as opposed to an abrupt transport drop, which carries no -response. +with a completion result before closing the stream. The result carries no +method-specific data beyond the standard result fields and subscription +metadata. This is the JSON-RPC response to the long-lived request, correlated by +its `id`, and signals that the subscription ended gracefully — as opposed to an +abrupt transport drop, which carries no response. ```json {