From cc1f19a051c349b0ea2a8205b06b30070f6e3f71 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Wed, 2 Oct 2024 14:51:42 +0100 Subject: [PATCH] Allow messages to contain other protocol versions --- src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index 5d91028e..22075741 100644 --- a/src/types.ts +++ b/src/types.ts @@ -202,7 +202,7 @@ export const InitializeRequestSchema = RequestSchema.extend({ /** * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well. */ - protocolVersion: z.literal(PROTOCOL_VERSION), + protocolVersion: z.number().int(), capabilities: ClientCapabilitiesSchema, clientInfo: ImplementationSchema, }), @@ -250,7 +250,7 @@ export const InitializeResultSchema = ResultSchema.extend({ /** * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect. */ - protocolVersion: z.literal(PROTOCOL_VERSION), + protocolVersion: z.number().int(), capabilities: ServerCapabilitiesSchema, serverInfo: ImplementationSchema, });