Skip to content

Commit 48ac917

Browse files
committed
Address review feedback
1 parent 1c14f65 commit 48ac917

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/mcp/server.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ def server_info
314314
end
315315

316316
def init(params)
317-
client_version = params&.dig(:protocolVersion) || params&.dig("protocolVersion")
318-
negotiated_version = if client_version && Configuration::SUPPORTED_STABLE_PROTOCOL_VERSIONS.include?(client_version)
319-
client_version
317+
protocol_version = params[:protocolVersion] if params
318+
negotiated_version = if protocol_version && Configuration::SUPPORTED_STABLE_PROTOCOL_VERSIONS.include?(protocol_version)
319+
protocol_version
320320
else
321321
configuration.protocol_version
322322
end

0 commit comments

Comments
 (0)