@@ -29,7 +29,7 @@ const BaseRequestParamsSchema = z
2929 */
3030 progressToken : z . optional ( ProgressTokenSchema ) ,
3131 } )
32- . passthrough ( )
32+ . passthrough ( ) ,
3333 ) ,
3434 } )
3535 . passthrough ( ) ;
@@ -100,16 +100,16 @@ export const JSONRPCResponseSchema = z
100100 . strict ( ) ;
101101
102102/**
103- * @author : Sumitesh Naithani
104- * @link : https://docs.trafficserver.apache.org/en/latest/developer-guide/jsonrpc/jsonrpc-node-errors.en.html#standard-errors
105- * @description : An incomplete set of error codes that may appear in JSON-RPC responses.
106- * @note : SDK-specific errors should use the server error range (-32000 to -32099), as per JSON-RPC 2.0 specification.
107- */
103+ * @author : Sumitesh Naithani
104+ * @link : https://docs.trafficserver.apache.org/en/latest/developer-guide/jsonrpc/jsonrpc-node-errors.en.html#standard-errors
105+ * @description : An incomplete set of error codes that may appear in JSON-RPC responses.
106+ * @note : SDK-specific errors should use the server error range (-32000 to -32099), as per JSON-RPC 2.0 specification.
107+ */
108108export enum ErrorCode {
109109 // SDK error codes (using server error range)
110110 ConnectionClosed = - 32000 ,
111111 RequestTimeout = - 32001 ,
112-
112+
113113 // Standard JSON-RPC error codes
114114 ParseError = - 32700 ,
115115 InvalidRequest = - 32600 ,
@@ -217,7 +217,7 @@ export const ClientCapabilitiesSchema = z
217217 */
218218 listChanged : z . optional ( z . boolean ( ) ) ,
219219 } )
220- . passthrough ( )
220+ . passthrough ( ) ,
221221 ) ,
222222 } )
223223 . passthrough ( ) ;
@@ -261,7 +261,7 @@ export const ServerCapabilitiesSchema = z
261261 */
262262 listChanged : z . optional ( z . boolean ( ) ) ,
263263 } )
264- . passthrough ( )
264+ . passthrough ( ) ,
265265 ) ,
266266 /**
267267 * Present if the server offers any resources to read.
@@ -279,7 +279,7 @@ export const ServerCapabilitiesSchema = z
279279 */
280280 listChanged : z . optional ( z . boolean ( ) ) ,
281281 } )
282- . passthrough ( )
282+ . passthrough ( ) ,
283283 ) ,
284284 /**
285285 * Present if the server offers any tools to call.
@@ -292,7 +292,7 @@ export const ServerCapabilitiesSchema = z
292292 */
293293 listChanged : z . optional ( z . boolean ( ) ) ,
294294 } )
295- . passthrough ( )
295+ . passthrough ( ) ,
296296 ) ,
297297 } )
298298 . passthrough ( ) ;
@@ -483,7 +483,7 @@ export const ListResourcesResultSchema = PaginatedResultSchema.extend({
483483export const ListResourceTemplatesRequestSchema = PaginatedRequestSchema . extend (
484484 {
485485 method : z . literal ( "resources/templates/list" ) ,
486- }
486+ } ,
487487) ;
488488
489489/**
@@ -511,7 +511,7 @@ export const ReadResourceRequestSchema = RequestSchema.extend({
511511 */
512512export const ReadResourceResultSchema = ResultSchema . extend ( {
513513 contents : z . array (
514- z . union ( [ TextResourceContentsSchema , BlobResourceContentsSchema ] )
514+ z . union ( [ TextResourceContentsSchema , BlobResourceContentsSchema ] ) ,
515515 ) ,
516516} ) ;
517517
@@ -750,7 +750,7 @@ export const ListToolsResultSchema = PaginatedResultSchema.extend({
750750 */
751751export const CallToolResultSchema = ResultSchema . extend ( {
752752 content : z . array (
753- z . union ( [ TextContentSchema , ImageContentSchema , EmbeddedResourceSchema ] )
753+ z . union ( [ TextContentSchema , ImageContentSchema , EmbeddedResourceSchema ] ) ,
754754 ) ,
755755 isError : z . boolean ( ) . default ( false ) . optional ( ) ,
756756} ) ;
@@ -761,7 +761,7 @@ export const CallToolResultSchema = ResultSchema.extend({
761761export const CompatibilityCallToolResultSchema = CallToolResultSchema . or (
762762 ResultSchema . extend ( {
763763 toolResult : z . unknown ( ) ,
764- } )
764+ } ) ,
765765) ;
766766
767767/**
@@ -922,7 +922,7 @@ export const CreateMessageResultSchema = ResultSchema.extend({
922922 * The reason why sampling stopped.
923923 */
924924 stopReason : z . optional (
925- z . enum ( [ "endTurn" , "stopSequence" , "maxTokens" ] ) . or ( z . string ( ) )
925+ z . enum ( [ "endTurn" , "stopSequence" , "maxTokens" ] ) . or ( z . string ( ) ) ,
926926 ) ,
927927 role : z . enum ( [ "user" , "assistant" ] ) ,
928928 content : z . discriminatedUnion ( "type" , [
@@ -1107,7 +1107,7 @@ export class McpError extends Error {
11071107 constructor (
11081108 public readonly code : number ,
11091109 message : string ,
1110- public readonly data ?: unknown
1110+ public readonly data ?: unknown ,
11111111 ) {
11121112 super ( `MCP error ${ code } : ${ message } ` ) ;
11131113 }
@@ -1240,4 +1240,4 @@ export type ClientResult = z.infer<typeof ClientResultSchema>;
12401240/* Server messages */
12411241export type ServerRequest = z . infer < typeof ServerRequestSchema > ;
12421242export type ServerNotification = z . infer < typeof ServerNotificationSchema > ;
1243- export type ServerResult = z . infer < typeof ServerResultSchema > ;
1243+ export type ServerResult = z . infer < typeof ServerResultSchema > ;
0 commit comments