diff --git a/docs/protocol/v2/draft/initialization.mdx b/docs/protocol/v2/draft/initialization.mdx index 01eb009d6..abff11aa4 100644 --- a/docs/protocol/v2/draft/initialization.mdx +++ b/docs/protocol/v2/draft/initialization.mdx @@ -103,7 +103,7 @@ See [Capabilities](#capabilities) to learn how non-breaking features are introdu ### Version negotiation -The `initialize` request **MUST** include the latest protocol version the Client supports. +The `initialize` request **MUST** include the latest protocol version the Client supports. After the Agent selects a lower version, the Client **MAY** send that version instead when it [repeats `initialize`](#repeating-initialization) or opens a new connection. The Agent **MUST** read `protocolVersion` before validating any other parameter. Missing, non-integer, or out-of-range values are malformed parameters and **MUST** receive `-32602` (`Invalid params`). diff --git a/docs/protocol/v2/initialization.mdx b/docs/protocol/v2/initialization.mdx index 6b12cb7d0..3a33400ad 100644 --- a/docs/protocol/v2/initialization.mdx +++ b/docs/protocol/v2/initialization.mdx @@ -103,7 +103,7 @@ See [Capabilities](#capabilities) to learn how non-breaking features are introdu ### Version negotiation -The `initialize` request **MUST** include the latest protocol version the Client supports. +The `initialize` request **MUST** include the latest protocol version the Client supports. After the Agent selects a lower version, the Client **MAY** send that version instead when it [repeats `initialize`](#repeating-initialization) or opens a new connection. The Agent **MUST** read `protocolVersion` before validating any other parameter. Missing, non-integer, or out-of-range values are malformed parameters and **MUST** receive `-32602` (`Invalid params`). diff --git a/docs/protocol/v2/migration.mdx b/docs/protocol/v2/migration.mdx index fb9c5a4dd..94490db36 100644 --- a/docs/protocol/v2/migration.mdx +++ b/docs/protocol/v2/migration.mdx @@ -1016,7 +1016,7 @@ Supporting both versions is the recommended path, not an edge case: v1 peers wil The [v2 version negotiation rules](/protocol/v2/initialization#version-negotiation) apply to Agent endpoints implementing v2, including dual-stack endpoints. They do not impose new requirements on legacy v1-only Agents: -- The Client **MUST** request the latest version it supports. +- The Client **MUST** request the latest version it supports. After the Agent selects a lower version, the Client **MAY** request that version when it repeats `initialize` or reconnects. - An Agent implementing v2 **MUST** select the highest supported version at or below the requested version. If none exists, it **MUST** return `-32022` with `requested` and `supported` data instead of a higher-version success response. - Both peers **MUST** use the selected version's specification for subsequent traffic. A Client that cannot support the returned version **SHOULD** close the connection and inform the user.