From 0bf7e66e98209dd5fd97dff09e8a3435e31f54aa Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 7 Nov 2024 12:57:19 +0000 Subject: [PATCH] Require `protocolVersion` to be a string now --- src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index b22e8fb2..1d8b1877 100644 --- a/src/types.ts +++ b/src/types.ts @@ -196,7 +196,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.string().or(z.number().int()), + protocolVersion: z.string(), capabilities: ClientCapabilitiesSchema, clientInfo: ImplementationSchema, }), @@ -268,7 +268,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.string().or(z.number().int()), + protocolVersion: z.string(), capabilities: ServerCapabilitiesSchema, serverInfo: ImplementationSchema, });