Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/protocol/v2/draft/initialization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/v2/initialization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/v2/migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading