From ecbcb8d591823efb18baf440d312a00f4b09407a Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Wed, 2 Oct 2024 22:05:23 +0100 Subject: [PATCH] yarn build --- dist/client/index.d.ts | 4 +- dist/client/index.d.ts.map | 2 +- dist/client/index.js | 6 +- dist/client/index.js.map | 2 +- dist/client/sse.d.ts | 2 +- dist/client/sse.d.ts.map | 2 +- dist/client/sse.js | 5 +- dist/client/sse.js.map | 2 +- dist/client/stdio.d.ts | 2 +- dist/client/stdio.d.ts.map | 2 +- dist/client/websocket.d.ts | 2 +- dist/client/websocket.d.ts.map | 2 +- dist/client/websocket.js | 5 +- dist/client/websocket.js.map | 2 +- dist/server/index.d.ts | 4 +- dist/server/index.d.ts.map | 2 +- dist/server/index.js | 6 +- dist/server/index.js.map | 2 +- dist/server/sse.d.ts | 4 +- dist/server/sse.d.ts.map | 2 +- dist/server/sse.js | 7 +- dist/server/sse.js.map | 2 +- dist/server/stdio.d.ts | 2 +- dist/server/stdio.d.ts.map | 2 +- dist/shared/message.d.ts | 3 - dist/shared/message.d.ts.map | 1 - dist/shared/message.js | 7 - dist/shared/message.js.map | 1 - dist/shared/protocol.d.ts | 19 +- dist/shared/protocol.d.ts.map | 2 +- dist/shared/protocol.js | 37 +- dist/shared/protocol.js.map | 2 +- dist/shared/stdio.d.ts | 2 +- dist/shared/stdio.d.ts.map | 2 +- dist/shared/stdio.js | 6 +- dist/shared/stdio.js.map | 2 +- dist/shared/transport.d.ts | 2 +- dist/shared/transport.d.ts.map | 2 +- dist/types.d.ts | 7369 ++++++++++++++++++++++++++++++++ dist/types.d.ts.map | 1 + dist/types.js | 738 ++++ dist/types.js.map | 1 + dist/types/index.d.ts | 13 - dist/types/index.d.ts.map | 1 - dist/types/index.js | 12 - dist/types/index.js.map | 1 - dist/types/schema.d.ts | 672 --- dist/types/schema.d.ts.map | 1 - dist/types/schema.js | 10 - dist/types/schema.js.map | 1 - 50 files changed, 8185 insertions(+), 796 deletions(-) delete mode 100644 dist/shared/message.d.ts delete mode 100644 dist/shared/message.d.ts.map delete mode 100644 dist/shared/message.js delete mode 100644 dist/shared/message.js.map create mode 100644 dist/types.d.ts create mode 100644 dist/types.d.ts.map create mode 100644 dist/types.js create mode 100644 dist/types.js.map delete mode 100644 dist/types/index.d.ts delete mode 100644 dist/types/index.d.ts.map delete mode 100644 dist/types/index.js delete mode 100644 dist/types/index.js.map delete mode 100644 dist/types/schema.d.ts delete mode 100644 dist/types/schema.d.ts.map delete mode 100644 dist/types/schema.js delete mode 100644 dist/types/schema.js.map diff --git a/dist/client/index.d.ts b/dist/client/index.d.ts index 30c2c008..18a92f49 100644 --- a/dist/client/index.d.ts +++ b/dist/client/index.d.ts @@ -1,12 +1,12 @@ import { Protocol } from "../shared/protocol.js"; import { Transport } from "../shared/transport.js"; -import { ClientNotification, ClientRequest, ClientResult, Implementation, ServerCapabilities, ServerNotification, ServerRequest, ServerResult } from "../types/index.js"; +import { ClientNotification, ClientRequest, ClientResult, Implementation, ServerCapabilities } from "../types.js"; /** * An MCP client on top of a pluggable transport. * * The client will automatically begin the initialization flow with the server when connect() is called. */ -export declare class Client extends Protocol { +export declare class Client extends Protocol { private _clientInfo; private _serverCapabilities?; private _serverVersion?; diff --git a/dist/client/index.d.ts.map b/dist/client/index.d.ts.map index 5337be22..a316bdfc 100644 --- a/dist/client/index.d.ts.map +++ b/dist/client/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,cAAc,EAGd,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,QAAQ,CAClC,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,YAAY,CACb;IAOa,OAAO,CAAC,WAAW;IAN/B,OAAO,CAAC,mBAAmB,CAAC,CAAqB;IACjD,OAAO,CAAC,cAAc,CAAC,CAAiB;IAExC;;OAEG;gBACiB,WAAW,EAAE,cAAc;IAIhC,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B3D;;OAEG;IACH,qBAAqB,IAAI,kBAAkB,GAAG,SAAS;IAIvD;;OAEG;IACH,gBAAgB,IAAI,cAAc,GAAG,SAAS;CAG/C"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,cAAc,EAGd,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,QAAQ,CAClC,aAAa,EACb,kBAAkB,EAClB,YAAY,CACb;IAOa,OAAO,CAAC,WAAW;IAN/B,OAAO,CAAC,mBAAmB,CAAC,CAAqB;IACjD,OAAO,CAAC,cAAc,CAAC,CAAiB;IAExC;;OAEG;gBACiB,WAAW,EAAE,cAAc;IAIhC,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAiC3D;;OAEG;IACH,qBAAqB,IAAI,kBAAkB,GAAG,SAAS;IAIvD;;OAEG;IACH,gBAAgB,IAAI,cAAc,GAAG,SAAS;CAG/C"} \ No newline at end of file diff --git a/dist/client/index.js b/dist/client/index.js index 9a6f7268..f5976b20 100644 --- a/dist/client/index.js +++ b/dist/client/index.js @@ -1,5 +1,5 @@ import { Protocol } from "../shared/protocol.js"; -import { PROTOCOL_VERSION, } from "../types/index.js"; +import { InitializeResultSchema, PROTOCOL_VERSION, } from "../types.js"; /** * An MCP client on top of a pluggable transport. * @@ -15,14 +15,14 @@ export class Client extends Protocol { } async connect(transport) { await super.connect(transport); - const result = (await this.request({ + const result = await this.request({ method: "initialize", params: { protocolVersion: 1, capabilities: {}, clientInfo: this._clientInfo, }, - })); + }, InitializeResultSchema); if (result === undefined) { throw new Error(`Server sent invalid initialize result: ${result}`); } diff --git a/dist/client/index.js.map b/dist/client/index.js.map index f1a0195e..9d0a3ef3 100644 --- a/dist/client/index.js.map +++ b/dist/client/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAML,gBAAgB,GAKjB,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,OAAO,MAAO,SAAQ,QAO3B;IAIC;;OAEG;IACH,YAAoB,WAA2B;QAC7C,KAAK,EAAE,CAAC;QADU,gBAAW,GAAX,WAAW,CAAgB;IAE/C,CAAC;IAEQ,KAAK,CAAC,OAAO,CAAC,SAAoB;QACzC,MAAM,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAE/B,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC;YACjC,MAAM,EAAE,YAAY;YACpB,MAAM,EAAE;gBACN,eAAe,EAAE,CAAC;gBAClB,YAAY,EAAE,EAAE;gBAChB,UAAU,EAAE,IAAI,CAAC,WAAW;aAC7B;SACF,CAAC,CAAqB,CAAC;QAExB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,MAAM,CAAC,eAAe,KAAK,gBAAgB,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CACb,+CAA+C,MAAM,CAAC,eAAe,EAAE,CACxE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,YAAY,CAAC;QAC/C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC;QAExC,MAAM,IAAI,CAAC,YAAY,CAAC;YACtB,MAAM,EAAE,2BAA2B;SACpC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,qBAAqB;QACnB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAKL,sBAAsB,EACtB,gBAAgB,GAEjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,OAAO,MAAO,SAAQ,QAI3B;IAIC;;OAEG;IACH,YAAoB,WAA2B;QAC7C,KAAK,EAAE,CAAC;QADU,gBAAW,GAAX,WAAW,CAAgB;IAE/C,CAAC;IAEQ,KAAK,CAAC,OAAO,CAAC,SAAoB;QACzC,MAAM,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAE/B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAC/B;YACE,MAAM,EAAE,YAAY;YACpB,MAAM,EAAE;gBACN,eAAe,EAAE,CAAC;gBAClB,YAAY,EAAE,EAAE;gBAChB,UAAU,EAAE,IAAI,CAAC,WAAW;aAC7B;SACF,EACD,sBAAsB,CACvB,CAAC;QAEF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,MAAM,CAAC,eAAe,KAAK,gBAAgB,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CACb,+CAA+C,MAAM,CAAC,eAAe,EAAE,CACxE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,YAAY,CAAC;QAC/C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC;QAExC,MAAM,IAAI,CAAC,YAAY,CAAC;YACtB,MAAM,EAAE,2BAA2B;SACpC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,qBAAqB;QACnB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF"} \ No newline at end of file diff --git a/dist/client/sse.d.ts b/dist/client/sse.d.ts index f87bc6b6..90179d73 100644 --- a/dist/client/sse.d.ts +++ b/dist/client/sse.d.ts @@ -1,5 +1,5 @@ import { Transport } from "../shared/transport.js"; -import { JSONRPCMessage } from "../types/index.js"; +import { JSONRPCMessage } from "../types.js"; /** * Client transport for SSE: this will connect to a server using Server-Sent Events for receiving * messages and make separate POST requests for sending messages. diff --git a/dist/client/sse.d.ts.map b/dist/client/sse.d.ts.map index 445209fd..b024960a 100644 --- a/dist/client/sse.d.ts.map +++ b/dist/client/sse.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/client/sse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,SAAS;IAClD,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,OAAO,CAAC,SAAS,CAAC,CAAM;IACxB,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAE3C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAoD1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CA0BnD"} \ No newline at end of file +{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/client/sse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAEnE;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,SAAS;IAClD,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,OAAO,CAAC,SAAS,CAAC,CAAM;IACxB,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAE3C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAmD1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CA0BnD"} \ No newline at end of file diff --git a/dist/client/sse.js b/dist/client/sse.js index 9fa1c84d..9b73d48f 100644 --- a/dist/client/sse.js +++ b/dist/client/sse.js @@ -1,4 +1,4 @@ -import { validateMessage } from "../shared/message.js"; +import { JSONRPCMessageSchema } from "../types.js"; /** * Client transport for SSE: this will connect to a server using Server-Sent Events for receiving * messages and make separate POST requests for sending messages. @@ -41,8 +41,7 @@ export class SSEClientTransport { const messageEvent = event; let message; try { - message = JSON.parse(messageEvent.data); - validateMessage(message); + message = JSONRPCMessageSchema.parse(JSON.parse(messageEvent.data)); } catch (error) { (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error); diff --git a/dist/client/sse.js.map b/dist/client/sse.js.map index 0c14a43e..f5e963d5 100644 --- a/dist/client/sse.js.map +++ b/dist/client/sse.js.map @@ -1 +1 @@ -{"version":3,"file":"sse.js","sourceRoot":"","sources":["../../src/client/sse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIvD;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IAS7B,OAAO,CAAC,GAAQ;QACd,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC9C,IAAI,CAAC,gBAAgB,GAAG,IAAI,eAAe,EAAE,CAAC;YAE9C,IAAI,CAAC,YAAY,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;;gBACpC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC/D,MAAM,CAAC,KAAK,CAAC,CAAC;gBACd,MAAA,IAAI,CAAC,OAAO,qDAAG,KAAK,CAAC,CAAC;YACxB,CAAC,CAAC;YAEF,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,GAAG,EAAE;gBAC9B,+EAA+E;YACjF,CAAC,CAAC;YAEF,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,KAAY,EAAE,EAAE;;gBAC9D,MAAM,YAAY,GAAG,KAAqB,CAAC;gBAE3C,IAAI,CAAC;oBACH,IAAI,CAAC,SAAS,GAAG,IAAI,G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G,KAAc,CAAC,CAAC;YAC/B,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/dist/client/stdio.d.ts b/dist/client/stdio.d.ts index 1370957d..f7959345 100644 --- a/dist/client/stdio.d.ts +++ b/dist/client/stdio.d.ts @@ -1,4 +1,4 @@ -import { JSONRPCMessage } from "../types/index.js"; +import { JSONRPCMessage } from "../types.js"; import { Transport } from "../shared/transport.js"; export type StdioServerParameters = { /** diff --git a/dist/client/stdio.d.ts.map b/dist/client/stdio.d.ts.map index ac704e22..18aaf3c2 100644 --- a/dist/client/stdio.d.ts.map +++ b/dist/client/stdio.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/client/stdio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,SAAS;IACpD,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,OAAO,CAAC,gBAAgB,CAA0C;IAClE,OAAO,CAAC,WAAW,CAAgC;IAEnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C;;OAEG;IACH,KAAK,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IA4CnD,OAAO,CAAC,iBAAiB;IAenB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAc7C"} \ No newline at end of file +{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/client/stdio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,SAAS;IACpD,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,OAAO,CAAC,gBAAgB,CAA0C;IAClE,OAAO,CAAC,WAAW,CAAgC;IAEnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C;;OAEG;IACH,KAAK,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IA4CnD,OAAO,CAAC,iBAAiB;IAenB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAc7C"} \ No newline at end of file diff --git a/dist/client/websocket.d.ts b/dist/client/websocket.d.ts index cb51a8cd..8973d95d 100644 --- a/dist/client/websocket.d.ts +++ b/dist/client/websocket.d.ts @@ -1,5 +1,5 @@ import { Transport } from "../shared/transport.js"; -import { JSONRPCMessage } from "../types/index.js"; +import { JSONRPCMessage } from "../types.js"; /** * Client transport for WebSocket: this will connect to a server over the WebSocket protocol. */ diff --git a/dist/client/websocket.d.ts.map b/dist/client/websocket.d.ts.map index 291a9775..fd3cb9ae 100644 --- a/dist/client/websocket.d.ts.map +++ b/dist/client/websocket.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/client/websocket.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD;;GAEG;AACH,qBAAa,wBAAyB,YAAW,SAAS;IACxD,OAAO,CAAC,OAAO,CAAC,CAAY;IAE5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAoC1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAW7C"} \ No newline at end of file +{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/client/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAInE;;GAEG;AACH,qBAAa,wBAAyB,YAAW,SAAS;IACxD,OAAO,CAAC,OAAO,CAAC,CAAY;IAE5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAW7C"} \ No newline at end of file diff --git a/dist/client/websocket.js b/dist/client/websocket.js index e03bb81b..905491ee 100644 --- a/dist/client/websocket.js +++ b/dist/client/websocket.js @@ -1,4 +1,4 @@ -import { validateMessage } from "../shared/message.js"; +import { JSONRPCMessageSchema } from "../types.js"; const SUBPROTOCOL = "mcp"; /** * Client transport for WebSocket: this will connect to a server over the WebSocket protocol. @@ -26,8 +26,7 @@ export class WebSocketClientTransport { var _a, _b; let message; try { - message = JSON.parse(event.data); - validateMessage(message); + message = JSONRPCMessageSchema.parse(JSON.parse(event.data)); } catch (error) { (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error); diff --git a/dist/client/websocket.js.map b/dist/client/websocket.js.map index 0d200089..8cfd6096 100644 --- a/dist/client/websocket.js.map +++ b/dist/client/websocket.js.map @@ -1 +1 @@ -{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../src/client/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIvD,MAAM,WAAW,GAAG,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAOnC,OAAO,CAAC,GAAQ;QACd,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,OAAO,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;YAE/C,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;;gBAC/B,MAAM,KAAK,GACT,OAAO,IAAI,KAAK;oBACd,CAAC,CAAE,KAAK,CAAC,KAAe;oBACxB,CAAC,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AAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;gBAC/D,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAA,IAAI,CAAC,OAAO,qDAAG,KAAc,CAAC,CAAC;oBAC/B,OAAO;gBACT,CAAC;gBAED,MAAA,IAAI,CAAC,SAAS,qDAAG,OAAO,CAAC,CAAC;YAC5B,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK;;QACT,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,OAAuB;QAC1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;;YACrC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;gBACnC,OAAO;YACT,CAAC;YAED,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5C,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/dist/server/index.d.ts b/dist/server/index.d.ts index 7bfbeeae..e38db2a2 100644 --- a/dist/server/index.d.ts +++ b/dist/server/index.d.ts @@ -1,11 +1,11 @@ import { Protocol } from "../shared/protocol.js"; -import { ClientCapabilities, ClientNotification, ClientRequest, ClientResult, Implementation, ServerNotification, ServerRequest, ServerResult } from "../types/index.js"; +import { ClientCapabilities, Implementation, ServerNotification, ServerRequest, ServerResult } from "../types.js"; /** * An MCP server on top of a pluggable transport. * * This server will automatically respond to the initialization flow as initiated from the client. */ -export declare class Server extends Protocol { +export declare class Server extends Protocol { private _serverInfo; private _clientCapabilities?; private _clientVersion?; diff --git a/dist/server/index.d.ts.map b/dist/server/index.d.ts.map index 75769899..70a6174d 100644 --- a/dist/server/index.d.ts.map +++ b/dist/server/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,cAAc,EAId,kBAAkB,EAClB,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,QAAQ,CAClC,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,YAAY,CACb;IAYa,OAAO,CAAC,WAAW;IAX/B,OAAO,CAAC,mBAAmB,CAAC,CAAqB;IACjD,OAAO,CAAC,cAAc,CAAC,CAAiB;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B;;OAEG;gBACiB,WAAW,EAAE,cAAc;YAWjC,aAAa;IAmB3B;;OAEG;IACH,qBAAqB,IAAI,kBAAkB,GAAG,SAAS;IAIvD;;OAEG;IACH,gBAAgB,IAAI,cAAc,GAAG,SAAS;CAG/C"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EAMd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,QAAQ,CAClC,aAAa,EACb,kBAAkB,EAClB,YAAY,CACb;IAYa,OAAO,CAAC,WAAW;IAX/B,OAAO,CAAC,mBAAmB,CAAC,CAAqB;IACjD,OAAO,CAAC,cAAc,CAAC,CAAiB;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B;;OAEG;gBACiB,WAAW,EAAE,cAAc;YAWjC,aAAa;IAmB3B;;OAEG;IACH,qBAAqB,IAAI,kBAAkB,GAAG,SAAS;IAIvD;;OAEG;IACH,gBAAgB,IAAI,cAAc,GAAG,SAAS;CAG/C"} \ No newline at end of file diff --git a/dist/server/index.js b/dist/server/index.js index 32357c49..615386d5 100644 --- a/dist/server/index.js +++ b/dist/server/index.js @@ -1,5 +1,5 @@ import { Protocol } from "../shared/protocol.js"; -import { PROTOCOL_VERSION, } from "../types/index.js"; +import { InitializedNotificationSchema, InitializeRequestSchema, PROTOCOL_VERSION, } from "../types.js"; /** * An MCP server on top of a pluggable transport. * @@ -12,8 +12,8 @@ export class Server extends Protocol { constructor(_serverInfo) { super(); this._serverInfo = _serverInfo; - this.setRequestHandler("initialize", (request) => this._oninitialize(request)); - this.setNotificationHandler("notification/initialized", () => { var _a; return (_a = this.oninitialized) === null || _a === void 0 ? void 0 : _a.call(this); }); + this.setRequestHandler(InitializeRequestSchema, (request) => this._oninitialize(request)); + this.setNotificationHandler(InitializedNotificationSchema, () => { var _a; return (_a = this.oninitialized) === null || _a === void 0 ? void 0 : _a.call(this); }); } async _oninitialize(request) { if (request.params.protocolVersion !== PROTOCOL_VERSION) { diff --git a/dist/server/index.js.map b/dist/server/index.js.map index dce078bb..6d759113 100644 --- a/dist/server/index.js.map +++ b/dist/server/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAQL,gBAAgB,GAIjB,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,OAAO,MAAO,SAAQ,QAO3B;IASC;;OAEG;IACH,YAAoB,WAA2B;QAC7C,KAAK,EAAE,CAAC;QADU,gBAAW,GAAX,WAAW,CAAgB;QAG7C,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,CAC/C,IAAI,CAAC,aAAa,CAAC,OAA4B,CAAC,CACjD,CAAC;QACF,IAAI,CAAC,sBAAsB,CAAC,0BAA0B,EAAE,GAAG,EAAE,WAC3D,OAAA,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA,EAAA,CACvB,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,aAAa,CACzB,OAA0B;QAE1B,IAAI,OAAO,CAAC,MAAM,CAAC,eAAe,KAAK,gBAAgB,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CACb,+CAA+C,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,CAChF,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;QACvD,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;QAEhD,OAAO;YACL,eAAe,EAAE,gBAAgB;YACjC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,qBAAqB;QACnB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAGL,6BAA6B,EAE7B,uBAAuB,EAEvB,gBAAgB,GAIjB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,OAAO,MAAO,SAAQ,QAI3B;IASC;;OAEG;IACH,YAAoB,WAA2B;QAC7C,KAAK,EAAE,CAAC;QADU,gBAAW,GAAX,WAAW,CAAgB;QAG7C,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,EAAE,CAAC,OAAO,EAAE,EAAE,CAC1D,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAC5B,CAAC;QACF,IAAI,CAAC,sBAAsB,CAAC,6BAA6B,EAAE,GAAG,EAAE,WAC9D,OAAA,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA,EAAA,CACvB,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,aAAa,CACzB,OAA0B;QAE1B,IAAI,OAAO,CAAC,MAAM,CAAC,eAAe,KAAK,gBAAgB,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CACb,+CAA+C,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,CAChF,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC;QACvD,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;QAEhD,OAAO;YACL,eAAe,EAAE,gBAAgB;YACjC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,qBAAqB;QACnB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF"} \ No newline at end of file diff --git a/dist/server/sse.d.ts b/dist/server/sse.d.ts index b58a0706..f0d30209 100644 --- a/dist/server/sse.d.ts +++ b/dist/server/sse.d.ts @@ -1,6 +1,6 @@ import { IncomingMessage, ServerResponse } from "node:http"; import { Transport } from "../shared/transport.js"; -import { JSONRPCMessage } from "../types/index.js"; +import { JSONRPCMessage } from "../types.js"; /** * Server transport for SSE: this will send messages over an SSE connection and receive messages from HTTP POST requests. * @@ -32,7 +32,7 @@ export declare class SSEServerTransport implements Transport { /** * Handle a client message, regardless of how it arrived. This can be used to inform the server of messages that arrive via a means different than HTTP POST. */ - handleMessage(message: JSONRPCMessage): Promise; + handleMessage(message: unknown): Promise; close(): Promise; send(message: JSONRPCMessage): Promise; /** diff --git a/dist/server/sse.d.ts.map b/dist/server/sse.d.ts.map index cbb2f420..9104f30c 100644 --- a/dist/server/sse.d.ts.map +++ b/dist/server/sse.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/server/sse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD;;;;GAIG;AACH,qBAAa,kBAAmB,YAAW,SAAS;IAWtC,OAAO,CAAC,SAAS;IAV7B,OAAO,CAAC,YAAY,CAAC,CAAiB;IACtC,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C;;OAEG;gBACiB,SAAS,EAAE,MAAM;IAIrC;;;;OAIG;IACG,UAAU,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB1E;;;;OAIG;IACG,iBAAiB,CACrB,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,IAAI,CAAC;IAkChB;;OAEG;IACG,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAWrD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAUlD;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;CACF"} \ No newline at end of file +{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/server/sse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAMnE;;;;GAIG;AACH,qBAAa,kBAAmB,YAAW,SAAS;IAWtC,OAAO,CAAC,SAAS;IAV7B,OAAO,CAAC,YAAY,CAAC,CAAiB;IACtC,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C;;OAEG;gBACiB,SAAS,EAAE,MAAM;IAIrC;;;;OAIG;IACG,UAAU,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB1E;;;;OAIG;IACG,iBAAiB,CACrB,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,IAAI,CAAC;IAkChB;;OAEG;IACG,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAUlD;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;CACF"} \ No newline at end of file diff --git a/dist/server/sse.js b/dist/server/sse.js index d5b8bc2a..1e05a872 100644 --- a/dist/server/sse.js +++ b/dist/server/sse.js @@ -1,5 +1,5 @@ import { randomUUID } from "node:crypto"; -import { validateMessage } from "../shared/message.js"; +import { JSONRPCMessageSchema } from "../types.js"; import getRawBody from "raw-body"; import contentType from "content-type"; const MAXIMUM_MESSAGE_SIZE = "4mb"; @@ -81,14 +81,15 @@ export class SSEServerTransport { */ async handleMessage(message) { var _a, _b; + let parsedMessage; try { - validateMessage(message); + parsedMessage = JSONRPCMessageSchema.parse(message); } catch (error) { (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error); throw error; } - (_b = this.onmessage) === null || _b === void 0 ? void 0 : _b.call(this, message); + (_b = this.onmessage) === null || _b === void 0 ? void 0 : _b.call(this, parsedMessage); } async close() { var _a, _b; diff --git a/dist/server/sse.js.map b/dist/server/sse.js.map index 94b43b68..cc5d8891 100644 --- a/dist/server/sse.js.map +++ b/dist/server/sse.js.map @@ -1 +1 @@ -{"version":3,"file":"sse.js","sourceRoot":"","sources":["../../src/server/sse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,UAAU,MAAM,UAAU,CAAC;AAClC,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAEnC;;;;GAIG;AACH,MAAM,OAAO,kBAAkB;IAQ7B;;OAEG;IACH,YAAoB,SAAiB;QAAjB,cAAS,GAAT,SAAS,CAAQ;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,UAAU,CAAC,GAAoB,EAAE,GAAmB;QACxD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACxC,CAAC;QAED,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE;YACjB,cAAc,EAAE,mBAAmB;YACnC,eAAe,EAAE,UAAU;YAC3B,UAAU,EAAE,YAAY;SACzB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,CAAC,OAAgB;;QAClC,IAAI,aAA6B,CAAC;QAClC,IAAI,CAAC;YACH,aAAa,GAAG,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAA,IAAI,CAAC,OAAO,qDAAG,KAAc,CAAC,CAAC;YAC/B,MAAM,KAAK,CAAC;QACd,CAAC;QAED,MAAA,IAAI,CAAC,SAAS,qDAAG,aAAa,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,KAAK;;QACT,MAAA,IAAI,CAAC,YAAY,0CAAE,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC9B,MAAA,IAAI,CAAC,OAAO,oDAAI,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAuB;QAChC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,KAAK,CACrB,yBAAyB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CACvD,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CACF"} \ No newline at end of file diff --git a/dist/server/stdio.d.ts b/dist/server/stdio.d.ts index 9a5713ca..08e5aa68 100644 --- a/dist/server/stdio.d.ts +++ b/dist/server/stdio.d.ts @@ -1,5 +1,5 @@ import { Readable, Writable } from "node:stream"; -import { JSONRPCMessage } from "../types/index.js"; +import { JSONRPCMessage } from "../types.js"; import { Transport } from "../shared/transport.js"; /** * Server transport for stdio: this communicates with a MCP client by reading from the current process' stdin and writing to stdout. diff --git a/dist/server/stdio.d.ts.map b/dist/server/stdio.d.ts.map index 74b127c0..10d4b022 100644 --- a/dist/server/stdio.d.ts.map +++ b/dist/server/stdio.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/server/stdio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,SAAS;IAIlD,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IAJjB,OAAO,CAAC,WAAW,CAAgC;gBAGzC,MAAM,GAAE,QAAwB,EAChC,OAAO,GAAE,QAAyB;IAG5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAG9C,OAAO,UAAW,MAAM,UAGtB;IACF,QAAQ,UAAW,KAAK,UAEtB;IAEF;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,OAAO,CAAC,iBAAiB;IAenB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAU7C"} \ No newline at end of file +{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/server/stdio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,SAAS;IAIlD,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IAJjB,OAAO,CAAC,WAAW,CAAgC;gBAGzC,MAAM,GAAE,QAAwB,EAChC,OAAO,GAAE,QAAyB;IAG5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAG9C,OAAO,UAAW,MAAM,UAGtB;IACF,QAAQ,UAAW,KAAK,UAEtB;IAEF;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,OAAO,CAAC,iBAAiB;IAenB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAU7C"} \ No newline at end of file diff --git a/dist/shared/message.d.ts b/dist/shared/message.d.ts deleted file mode 100644 index fec8080c..00000000 --- a/dist/shared/message.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { JSONRPCMessage } from "../types/index.js"; -export declare function validateMessage(message: JSONRPCMessage): void; -//# sourceMappingURL=message.d.ts.map \ No newline at end of file diff --git a/dist/shared/message.d.ts.map b/dist/shared/message.d.ts.map deleted file mode 100644 index a2f67e00..00000000 --- a/dist/shared/message.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/shared/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAM7D"} \ No newline at end of file diff --git a/dist/shared/message.js b/dist/shared/message.js deleted file mode 100644 index 077b11db..00000000 --- a/dist/shared/message.js +++ /dev/null @@ -1,7 +0,0 @@ -// Throws an exception if the message is invalid or unsupported. -export function validateMessage(message) { - if (message.jsonrpc !== "2.0") { - throw new Error(`Message is not in a supported JSON-RPC version: ${message}`); - } -} -//# sourceMappingURL=message.js.map \ No newline at end of file diff --git a/dist/shared/message.js.map b/dist/shared/message.js.map deleted file mode 100644 index 98e343ed..00000000 --- a/dist/shared/message.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/shared/message.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,MAAM,UAAU,eAAe,CAAC,OAAuB;IACrD,IAAI,OAAO,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACb,mDAAmD,OAAO,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/dist/shared/protocol.d.ts b/dist/shared/protocol.d.ts index ff5b4c88..973cf8d5 100644 --- a/dist/shared/protocol.d.ts +++ b/dist/shared/protocol.d.ts @@ -1,4 +1,5 @@ -import { Notification, Progress, Request, Result } from "../types/index.js"; +import { AnyZodObject, ZodLiteral, ZodObject, z } from "zod"; +import { Notification, Progress, Request, Result } from "../types.js"; import { Transport } from "./transport.js"; /** * Callback for progress notifications. @@ -8,7 +9,7 @@ export type ProgressCallback = (progress: Progress) => void; * Implements MCP protocol framing on top of a pluggable transport, including * features like request/response linking, notifications, and progress. */ -export declare class Protocol { +export declare class Protocol { private _transport?; private _requestMessageId; private _requestHandlers; @@ -30,11 +31,11 @@ export declare class Protocol Promise; + fallbackRequestHandler?: (request: Request) => Promise; /** * A handler to invoke for any notification types that do not have their own handler installed. */ - fallbackNotificationHandler?: (notification: ReceiveNotificationT) => Promise; + fallbackNotificationHandler?: (notification: Notification) => Promise; constructor(); /** * Attaches to the given transport and starts listening for messages. @@ -58,7 +59,7 @@ export declare class Protocol; + request(request: SendRequestT, resultSchema: T, onprogress?: ProgressCallback): Promise>; /** * Emits a notification, which is a one-way message that does not expect a response. */ @@ -68,7 +69,9 @@ export declare class Protocol SendResultT | Promise): void; + setRequestHandler; + }>>(requestSchema: T, handler: (request: z.infer) => SendResultT | Promise): void; /** * Removes the request handler for the given method. */ @@ -78,7 +81,9 @@ export declare class Protocol(method: string, handler: (notification: T) => void | Promise): void; + setNotificationHandler; + }>>(notificationSchema: T, handler: (notification: z.infer) => void | Promise): void; /** * Removes the notification handler for the given method. */ diff --git a/dist/shared/protocol.d.ts.map b/dist/shared/protocol.d.ts.map index 3b5eb350..1ce25dfd 100644 --- a/dist/shared/protocol.d.ts.map +++ b/dist/shared/protocol.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,YAAY,EAEZ,QAAQ,EAGR,OAAO,EACP,MAAM,EACP,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;AAE5D;;;GAGG;AACH,qBAAa,QAAQ,CACnB,eAAe,SAAS,OAAO,EAC/B,oBAAoB,SAAS,YAAY,EACzC,cAAc,SAAS,MAAM,EAC7B,YAAY,SAAS,OAAO,EAC5B,iBAAiB,SAAS,YAAY,EACtC,WAAW,SAAS,MAAM;IAE1B,OAAO,CAAC,UAAU,CAAC,CAAY;IAC/B,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,gBAAgB,CAGV;IACd,OAAO,CAAC,qBAAqB,CAGf;IACd,OAAO,CAAC,iBAAiB,CAGX;IACd,OAAO,CAAC,iBAAiB,CAA4C;IAErE;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC;;OAEG;IACH,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAE5E;;OAEG;IAC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AAC;IAI5B;;;;OAIG;IACH,OAAO,CAAC,CAAC,SAAS,YAAY,EAC5B,OAAO,EAAE,YAAY,EACrB,YAAY,EAAE,CAAC,EACf,UAAU,CAAC,EAAE,gBAAgB,GAC5B,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAuCtB;;OAEG;IACG,YAAY,CAAC,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAalE;;;;OAIG;IACH,iBAAiB,CACf,CAAC,SAAS,SAAS,CAAC;QAClB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;KAC5B,CAAC,EAEF,aAAa,EAAE,CAAC,EAChB,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,GACnE,IAAI;IAMP;;OAEG;IACH,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI1C;;;;OAIG;IACH,sBAAsB,CACpB,CAAC,SAAS,SAAS,CAAC;QAClB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;KAC5B,CAAC,EAEF,kBAAkB,EAAE,CAAC,EACrB,OAAO,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAC1D,IAAI;IAQP;;OAEG;IACH,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAGhD"} \ No newline at end of file diff --git a/dist/shared/protocol.js b/dist/shared/protocol.js index 0b7c9bca..310d43e4 100644 --- a/dist/shared/protocol.js +++ b/dist/shared/protocol.js @@ -1,4 +1,4 @@ -import { CONNECTION_CLOSED_ERROR, INTERNAL_ERROR, McpError, METHOD_NOT_FOUND, PING_REQUEST_METHOD, PROGRESS_NOTIFICATION_METHOD, } from "../types/index.js"; +import { ErrorCode, McpError, PingRequestSchema, ProgressNotificationSchema, } from "../types.js"; /** * Implements MCP protocol framing on top of a pluggable transport, including * features like request/response linking, notifications, and progress. @@ -10,10 +10,10 @@ export class Protocol { this._notificationHandlers = new Map(); this._responseHandlers = new Map(); this._progressHandlers = new Map(); - this.setNotificationHandler(PROGRESS_NOTIFICATION_METHOD, (notification) => { + this.setNotificationHandler(ProgressNotificationSchema, (notification) => { this._onprogress(notification); }); - this.setRequestHandler(PING_REQUEST_METHOD, + this.setRequestHandler(PingRequestSchema, // Automatic pong by default. (_request) => ({})); } @@ -49,7 +49,7 @@ export class Protocol { this._progressHandlers.clear(); this._transport = undefined; (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this); - const error = new McpError(CONNECTION_CLOSED_ERROR, "Connection closed"); + const error = new McpError(ErrorCode.ConnectionClosed, "Connection closed"); for (const handler of responseHandlers.values()) { handler(error); } @@ -75,7 +75,7 @@ export class Protocol { jsonrpc: "2.0", id: request.id, error: { - code: METHOD_NOT_FOUND, + code: ErrorCode.MethodNotFound, message: "Method not found", }, }).catch((error) => this._onerror(new Error(`Failed to send an error response: ${error}`))); @@ -97,7 +97,7 @@ export class Protocol { error: { code: error["code"] ? Math.floor(Number(error["code"])) - : INTERNAL_ERROR, + : ErrorCode.InternalError, message: (_b = error.message) !== null && _b !== void 0 ? _b : "Internal error", }, }); @@ -123,7 +123,7 @@ export class Protocol { this._responseHandlers.delete(Number(messageId)); this._progressHandlers.delete(Number(messageId)); if ("result" in response) { - handler(response.result); + handler(response); } else { const error = new McpError(response.error.code, response.error.message, response.error.data); @@ -145,8 +145,7 @@ export class Protocol { * * Do not use this method to emit notifications! Use notification() instead. */ - // TODO: This could infer a better response type based on the method - request(request, onprogress) { + request(request, resultSchema, onprogress) { return new Promise((resolve, reject) => { if (!this._transport) { reject(new Error("Not connected")); @@ -167,10 +166,14 @@ export class Protocol { } this._responseHandlers.set(messageId, (response) => { if (response instanceof Error) { - reject(response); + return reject(response); } - else { - resolve(response); + try { + const result = resultSchema.parse(response.result); + resolve(result); + } + catch (error) { + reject(error); } }); this._transport.send(jsonrpcRequest).catch(reject); @@ -194,9 +197,8 @@ export class Protocol { * * Note that this will replace any previous request handler for the same method. */ - // TODO: This could infer a better request type based on the method. - setRequestHandler(method, handler) { - this._requestHandlers.set(method, (request) => Promise.resolve(handler(request))); + setRequestHandler(requestSchema, handler) { + this._requestHandlers.set(requestSchema.shape.method.value, (request) => Promise.resolve(handler(requestSchema.parse(request)))); } /** * Removes the request handler for the given method. @@ -209,9 +211,8 @@ export class Protocol { * * Note that this will replace any previous notification handler for the same method. */ - // TODO: This could infer a better notification type based on the method. - setNotificationHandler(method, handler) { - this._notificationHandlers.set(method, (notification) => Promise.resolve(handler(notification))); + setNotificationHandler(notificationSchema, handler) { + this._notificationHandlers.set(notificationSchema.shape.method.value, (notification) => Promise.resolve(handler(notificationSchema.parse(notification)))); } /** * Removes the notification handler for the given method. diff --git a/dist/shared/protocol.js.map b/dist/shared/protocol.js.map index b12e4792..91c09c25 100644 --- a/dist/shared/protocol.js.map +++ b/dist/shared/protocol.js.map @@ -1 +1 @@ -{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,cAAc,EAKd,QAAQ,EACR,gBAAgB,EAEhB,mBAAmB,EAEnB,4BAA4B,GAI7B,MAAM,mBAAmB,CAAC;AAQ3B;;;GAGG;AACH,MAAM,OAAO,QAAQ;IAkDnB;QAzCQ,sBAAiB,GAAG,CAAC,CAAC;QACtB,qBAAgB,GAGpB,IAAI,GAAG,EAAE,CAAC;QACN,0BAAqB,GAGzB,IAAI,GAAG,EAAE,CAAC;QACN,sBAAiB,GAGrB,IAAI,GAAG,EAAE,CAAC;QACN,sBAAiB,GAAkC,IAAI,GAAG,EAAE,CAAC;QA6BnE,IAAI,CAAC,sBAAsB,CACzB,4BAA4B,EAC5B,CAAC,YAAY,EAAE,EAAE;YACf,IAAI,CAAC,WAAW,CAAC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c,EACd,OAAyE;QAEzE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAC5C,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAClC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,MAAc;QACjC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACH,yEAAyE;IACzE,sBAAsB,CACpB,MAAc,EACd,OAAkD;QAElD,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,EAAE,CACtD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,YAAiB,CAAC,CAAC,CAC5C,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,yBAAyB,CAAC,MAAc;QACtC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKT,QAAQ,EAER,iBAAiB,EAGjB,0BAA0B,GAG3B,MAAM,aAAa,CAAC;AAQrB;;;GAGG;AACH,MAAM,OAAO,QAAQ;IA6CnB;QAvCQ,sBAAiB,GAAG,CAAC,CAAC;QACtB,qBAAgB,GAGpB,IAAI,GAAG,EAAE,CAAC;QACN,0BAAqB,GAGzB,IAAI,GAAG,EAAE,CAAC;QACN,sBAAiB,GAGrB,IAAI,GAAG,EAAE,CAAC;QACN,sBAAiB,GAAkC,IAAI,GAAG,EAAE,CAAC;QA2BnE,IAAI,CAAC,sBAAsB,CAAC,0BAA0B,EAAE,CAAC,YAAY,EAAE,EAAE;YACvE,IAAI,CAAC,WAAW,CAAC,YAA+C,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;QAEH,IAA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AEF,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,iBAAiB,CAKf,aAAgB,EAChB,OAAoE;QAEpE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CACtE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CACvD,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,MAAc;QACjC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACH,sBAAsB,CAKpB,kBAAqB,EACrB,OAA2D;QAE3D,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAC5B,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EACrC,CAAC,YAAY,EAAE,EAAE,CACf,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CACnE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,yBAAyB,CAAC,MAAc;QACtC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/shared/stdio.d.ts b/dist/shared/stdio.d.ts index a6cc7e7c..c9975947 100644 --- a/dist/shared/stdio.d.ts +++ b/dist/shared/stdio.d.ts @@ -1,4 +1,4 @@ -import { JSONRPCMessage } from "../types/index.js"; +import { JSONRPCMessage } from "../types.js"; /** * Buffers a continuous stdio stream into discrete JSON-RPC messages. */ diff --git a/dist/shared/stdio.d.ts.map b/dist/shared/stdio.d.ts.map index 606dc665..c7da7764 100644 --- a/dist/shared/stdio.d.ts.map +++ b/dist/shared/stdio.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/shared/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI3B,WAAW,IAAI,cAAc,GAAG,IAAI;IAepC,KAAK,IAAI,IAAI;CAGd;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAI/D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAEhE"} \ No newline at end of file +{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/shared/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAEnE;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI3B,WAAW,IAAI,cAAc,GAAG,IAAI;IAepC,KAAK,IAAI,IAAI;CAGd;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAE/D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAEhE"} \ No newline at end of file diff --git a/dist/shared/stdio.js b/dist/shared/stdio.js index 6422a9a8..d0dde058 100644 --- a/dist/shared/stdio.js +++ b/dist/shared/stdio.js @@ -1,4 +1,4 @@ -import { validateMessage } from "./message.js"; +import { JSONRPCMessageSchema } from "../types.js"; /** * Buffers a continuous stdio stream into discrete JSON-RPC messages. */ @@ -23,9 +23,7 @@ export class ReadBuffer { } } export function deserializeMessage(line) { - const message = JSON.parse(line); - validateMessage(message); - return message; + return JSONRPCMessageSchema.parse(JSON.parse(line)); } export function serializeMessage(message) { return JSON.stringify(message) + "\n"; diff --git a/dist/shared/stdio.js.map b/dist/shared/stdio.js.map index 00cb68ff..77ca55aa 100644 --- a/dist/shared/stdio.js.map +++ b/dist/shared/stdio.js.map @@ -1 +1 @@ -{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/shared/stdio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,OAAO,UAAU;IAGrB,MAAM,CAAC,KAAa;QAClB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7E,CAAC;IAED,WAAW;QACT,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAChD,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC3B,CAAC;CACF;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAmB,CAAC;IACnD,eAAe,CAAC,OAAO,CAAC,C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AAC;AACtD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACtD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/dist/shared/transport.d.ts b/dist/shared/transport.d.ts index 146fbaff..ddfee503 100644 --- a/dist/shared/transport.d.ts +++ b/dist/shared/transport.d.ts @@ -1,4 +1,4 @@ -import { JSONRPCMessage } from "../types/index.js"; +import { JSONRPCMessage } from "../types.js"; /** * Describes the minimal contract for a MCP transport that a client or server can communicate over. */ diff --git a/dist/shared/transport.d.ts.map b/dist/shared/transport.d.ts.map index be081238..e789fbf8 100644 --- a/dist/shared/transport.d.ts.map +++ b/dist/shared/transport.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/shared/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;CAC/C"} \ No newline at end of file +{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/shared/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;CAC/C"} \ No newline at end of file diff --git a/dist/types.d.ts b/dist/types.d.ts new file mode 100644 index 00000000..9bfabe78 --- /dev/null +++ b/dist/types.d.ts @@ -0,0 +1,7369 @@ +import { z } from "zod"; +export declare const JSONRPC_VERSION = "2.0"; +/** + * A progress token, used to associate progress notifications with the original request. + */ +export declare const ProgressTokenSchema: z.ZodUnion<[z.ZodString, z.ZodNumber]>; +export declare const RequestSchema: z.ZodObject<{ + method: z.ZodString; + params: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, "strip", z.ZodTypeAny, { + method: string; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: string; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +export declare const NotificationSchema: z.ZodObject<{ + method: z.ZodString; + params: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, "strip", z.ZodTypeAny, { + method: string; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: string; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +export declare const ResultSchema: z.ZodObject<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, z.ZodTypeAny, "passthrough">>; +/** + * A uniquely identifying ID for a request in JSON-RPC. + */ +export declare const RequestIdSchema: z.ZodUnion<[z.ZodString, z.ZodNumber]>; +/** + * A request that expects a response. + */ +export declare const JSONRPCRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + jsonrpc: z.ZodLiteral<"2.0">; + id: z.ZodUnion<[z.ZodString, z.ZodNumber]>; +}>, "strict", z.ZodTypeAny, { + method: string; + jsonrpc: "2.0"; + id: string | number; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: string; + jsonrpc: "2.0"; + id: string | number; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * A notification which does not expect a response. + */ +export declare const JSONRPCNotificationSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + jsonrpc: z.ZodLiteral<"2.0">; +}>, "strict", z.ZodTypeAny, { + method: string; + jsonrpc: "2.0"; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: string; + jsonrpc: "2.0"; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * A successful (non-error) response to a request. + */ +export declare const JSONRPCResponseSchema: z.ZodObject<{ + jsonrpc: z.ZodLiteral<"2.0">; + id: z.ZodUnion<[z.ZodString, z.ZodNumber]>; + result: z.ZodObject<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>; +}, "strict", z.ZodTypeAny, { + jsonrpc: "2.0"; + id: string | number; + result: { + _meta?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + } & { + [k: string]: unknown; + }; +}, { + jsonrpc: "2.0"; + id: string | number; + result: { + _meta?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + } & { + [k: string]: unknown; + }; +}>; +/** + * An incomplete set of error codes that may appear in JSON-RPC responses. + */ +export declare enum ErrorCode { + ConnectionClosed = -1, + ParseError = -32700, + InvalidRequest = -32600, + MethodNotFound = -32601, + InvalidParams = -32602, + InternalError = -32603 +} +/** + * A response to a request that indicates an error occurred. + */ +export declare const JSONRPCErrorSchema: z.ZodObject<{ + jsonrpc: z.ZodLiteral<"2.0">; + id: z.ZodUnion<[z.ZodString, z.ZodNumber]>; + error: z.ZodObject<{ + /** + * The error type that occurred. + */ + code: z.ZodNumber; + /** + * A short description of the error. The message SHOULD be limited to a concise single sentence. + */ + message: z.ZodString; + /** + * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). + */ + data: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + code: number; + message: string; + data?: unknown; + }, { + code: number; + message: string; + data?: unknown; + }>; +}, "strict", z.ZodTypeAny, { + jsonrpc: "2.0"; + id: string | number; + error: { + code: number; + message: string; + data?: unknown; + }; +}, { + jsonrpc: "2.0"; + id: string | number; + error: { + code: number; + message: string; + data?: unknown; + }; +}>; +export declare const JSONRPCMessageSchema: z.ZodUnion<[z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + jsonrpc: z.ZodLiteral<"2.0">; + id: z.ZodUnion<[z.ZodString, z.ZodNumber]>; +}>, "strict", z.ZodTypeAny, { + method: string; + jsonrpc: "2.0"; + id: string | number; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: string; + jsonrpc: "2.0"; + id: string | number; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + jsonrpc: z.ZodLiteral<"2.0">; +}>, "strict", z.ZodTypeAny, { + method: string; + jsonrpc: "2.0"; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: string; + jsonrpc: "2.0"; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject<{ + jsonrpc: z.ZodLiteral<"2.0">; + id: z.ZodUnion<[z.ZodString, z.ZodNumber]>; + result: z.ZodObject<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>; +}, "strict", z.ZodTypeAny, { + jsonrpc: "2.0"; + id: string | number; + result: { + _meta?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + } & { + [k: string]: unknown; + }; +}, { + jsonrpc: "2.0"; + id: string | number; + result: { + _meta?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + } & { + [k: string]: unknown; + }; +}>, z.ZodObject<{ + jsonrpc: z.ZodLiteral<"2.0">; + id: z.ZodUnion<[z.ZodString, z.ZodNumber]>; + error: z.ZodObject<{ + /** + * The error type that occurred. + */ + code: z.ZodNumber; + /** + * A short description of the error. The message SHOULD be limited to a concise single sentence. + */ + message: z.ZodString; + /** + * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). + */ + data: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + code: number; + message: string; + data?: unknown; + }, { + code: number; + message: string; + data?: unknown; + }>; +}, "strict", z.ZodTypeAny, { + jsonrpc: "2.0"; + id: string | number; + error: { + code: number; + message: string; + data?: unknown; + }; +}, { + jsonrpc: "2.0"; + id: string | number; + error: { + code: number; + message: string; + data?: unknown; + }; +}>]>; +/** + * A response that indicates success but carries no data. + */ +export declare const EmptyResultSchema: z.ZodObject<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, "strict", z.ZodTypeAny, { + _meta?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}, { + _meta?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}>; +export declare const PROTOCOL_VERSION = 1; +/** + * Text provided to or from an LLM. + */ +export declare const TextContentSchema: z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; +}, "strip", z.ZodTypeAny, { + type: "text"; + text: string; +}, { + type: "text"; + text: string; +}>; +/** + * An image provided to or from an LLM. + */ +export declare const ImageContentSchema: z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; +}, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; +}, { + type: "image"; + data: string; + mimeType: string; +}>; +/** + * Describes a message issued to or received from an LLM API. + */ +export declare const SamplingMessageSchema: z.ZodObject<{ + role: z.ZodEnum<["user", "assistant"]>; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; +}, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; +}, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; +}>; +/** + * Describes the name and version of an MCP implementation. + */ +export declare const ImplementationSchema: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; +}, "strip", z.ZodTypeAny, { + name: string; + version: string; +}, { + name: string; + version: string; +}>; +/** + * Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities. + */ +export declare const ClientCapabilitiesSchema: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the client supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the client supports sampling from an LLM. + */ + sampling: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * This request is sent from the client to the server when it first connects, asking it to begin initialization. + */ +export declare const InitializeRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"initialize">; + params: z.ZodObject<{ + /** + * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well. + */ + protocolVersion: z.ZodNumber; + capabilities: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the client supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the client supports sampling from an LLM. + */ + sampling: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + clientInfo: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; + }, "strip", z.ZodTypeAny, { + name: string; + version: string; + }, { + name: string; + version: string; + }>; + }, "strip", z.ZodTypeAny, { + protocolVersion: number; + capabilities: { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + clientInfo: { + name: string; + version: string; + }; + }, { + protocolVersion: number; + capabilities: { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + clientInfo: { + name: string; + version: string; + }; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + protocolVersion: number; + capabilities: { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + clientInfo: { + name: string; + version: string; + }; + }; + method: "initialize"; +}, { + params: { + protocolVersion: number; + capabilities: { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + clientInfo: { + name: string; + version: string; + }; + }; + method: "initialize"; +}>; +/** + * Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities. + */ +export declare const ServerCapabilitiesSchema: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the server supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server supports sending log messages to the client. + */ + logging: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any prompt templates. + */ + prompts: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any resources to read. + */ + resources: z.ZodOptional; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any tools to call. + */ + tools: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * After receiving an initialize request from the client, the server sends this response. + */ +export declare const InitializeResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * 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.ZodNumber; + capabilities: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the server supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server supports sending log messages to the client. + */ + logging: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any prompt templates. + */ + prompts: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any resources to read. + */ + resources: z.ZodOptional; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any tools to call. + */ + tools: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + serverInfo: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; + }, "strip", z.ZodTypeAny, { + name: string; + version: string; + }, { + name: string; + version: string; + }>; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * 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.ZodNumber; + capabilities: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the server supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server supports sending log messages to the client. + */ + logging: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any prompt templates. + */ + prompts: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any resources to read. + */ + resources: z.ZodOptional; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any tools to call. + */ + tools: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + serverInfo: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; + }, "strip", z.ZodTypeAny, { + name: string; + version: string; + }, { + name: string; + version: string; + }>; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * 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.ZodNumber; + capabilities: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the server supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server supports sending log messages to the client. + */ + logging: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any prompt templates. + */ + prompts: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any resources to read. + */ + resources: z.ZodOptional; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any tools to call. + */ + tools: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + serverInfo: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; + }, "strip", z.ZodTypeAny, { + name: string; + version: string; + }, { + name: string; + version: string; + }>; +}>, z.ZodTypeAny, "passthrough">>; +/** + * This notification is sent from the client to the server after initialization has finished. + */ +export declare const InitializedNotificationSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/initialized">; +}>, "strip", z.ZodTypeAny, { + method: "notifications/initialized"; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "notifications/initialized"; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected. + */ +export declare const PingRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"ping">; +}>, "strip", z.ZodTypeAny, { + method: "ping"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "ping"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +export declare const ProgressSchema: z.ZodObject<{ + /** + * The progress thus far. This should increase every time progress is made, even if the total is unknown. + */ + progress: z.ZodNumber; + /** + * Total number of items to process (or total progress required), if known. + */ + total: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + progress: number; + total?: number | undefined; +}, { + progress: number; + total?: number | undefined; +}>; +/** + * An out-of-band notification used to inform the receiver of a progress update for a long-running request. + */ +export declare const ProgressNotificationSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/progress">; + params: z.ZodObject; + }, { + /** + * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding. + */ + progressToken: z.ZodUnion<[z.ZodString, z.ZodNumber]>; + }>, "strip", z.ZodTypeAny, { + progressToken: string | number; + progress: number; + total?: number | undefined; + }, { + progressToken: string | number; + progress: number; + total?: number | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + progressToken: string | number; + progress: number; + total?: number | undefined; + }; + method: "notifications/progress"; +}, { + params: { + progressToken: string | number; + progress: number; + total?: number | undefined; + }; + method: "notifications/progress"; +}>; +/** + * The contents of a specific resource or sub-resource. + */ +export declare const ResourceContentsSchema: z.ZodObject<{ + /** + * The URI of this resource. + */ + uri: z.ZodString; + /** + * The MIME type of this resource, if known. + */ + mimeType: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + uri: string; + mimeType?: string | undefined; +}, { + uri: string; + mimeType?: string | undefined; +}>; +export declare const TextResourceContentsSchema: z.ZodObject; +}, { + /** + * The text of the item. This must only be set if the item can actually be represented as text (not binary data). + */ + text: z.ZodString; +}>, "strip", z.ZodTypeAny, { + text: string; + uri: string; + mimeType?: string | undefined; +}, { + text: string; + uri: string; + mimeType?: string | undefined; +}>; +export declare const BlobResourceContentsSchema: z.ZodObject; +}, { + /** + * A base64-encoded string representing the binary data of the item. + */ + blob: z.ZodString; +}>, "strip", z.ZodTypeAny, { + uri: string; + blob: string; + mimeType?: string | undefined; +}, { + uri: string; + blob: string; + mimeType?: string | undefined; +}>; +/** + * A known resource that the server is capable of reading. + */ +export declare const ResourceSchema: z.ZodObject<{ + /** + * The URI of this resource. + */ + uri: z.ZodString; + /** + * A human-readable name for this resource. + * + * This can be used by clients to populate UI elements. + */ + name: z.ZodString; + /** + * A description of what this resource represents. + * + * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model. + */ + description: z.ZodOptional; + /** + * The MIME type of this resource, if known. + */ + mimeType: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; +}, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; +}>; +/** + * A template description for resources available on the server. + */ +export declare const ResourceTemplateSchema: z.ZodObject<{ + /** + * A URI template (according to RFC 6570) that can be used to construct resource URIs. + */ + uriTemplate: z.ZodString; + /** + * A human-readable name for the type of resource this template refers to. + * + * This can be used by clients to populate UI elements. + */ + name: z.ZodString; + /** + * A description of what this template is for. + * + * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model. + */ + description: z.ZodOptional; + /** + * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. + */ + mimeType: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; +}, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; +}>; +/** + * Sent from the client to request a list of resources the server has. + */ +export declare const ListResourcesRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"resources/list">; +}>, "strip", z.ZodTypeAny, { + method: "resources/list"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "resources/list"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * The server's response to a resources/list request from the client. + */ +export declare const ListResourcesResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + resourceTemplates: z.ZodOptional; + /** + * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; + resources: z.ZodOptional; + /** + * The MIME type of this resource, if known. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + resourceTemplates: z.ZodOptional; + /** + * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; + resources: z.ZodOptional; + /** + * The MIME type of this resource, if known. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + resourceTemplates: z.ZodOptional; + /** + * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; + resources: z.ZodOptional; + /** + * The MIME type of this resource, if known. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; +}>, z.ZodTypeAny, "passthrough">>; +/** + * Sent from the client to the server, to read a specific resource URI. + */ +export declare const ReadResourceRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"resources/read">; + params: z.ZodObject<{ + /** + * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + uri: string; + }, { + uri: string; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + uri: string; + }; + method: "resources/read"; +}, { + params: { + uri: string; + }; + method: "resources/read"; +}>; +/** + * The server's response to a resources/read request from the client. + */ +export declare const ReadResourceResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + contents: z.ZodArray; + }, { + /** + * The text of the item. This must only be set if the item can actually be represented as text (not binary data). + */ + text: z.ZodString; + }>, "strip", z.ZodTypeAny, { + text: string; + uri: string; + mimeType?: string | undefined; + }, { + text: string; + uri: string; + mimeType?: string | undefined; + }>, z.ZodObject; + }, { + /** + * A base64-encoded string representing the binary data of the item. + */ + blob: z.ZodString; + }>, "strip", z.ZodTypeAny, { + uri: string; + blob: string; + mimeType?: string | undefined; + }, { + uri: string; + blob: string; + mimeType?: string | undefined; + }>]>, "many">; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + contents: z.ZodArray; + }, { + /** + * The text of the item. This must only be set if the item can actually be represented as text (not binary data). + */ + text: z.ZodString; + }>, "strip", z.ZodTypeAny, { + text: string; + uri: string; + mimeType?: string | undefined; + }, { + text: string; + uri: string; + mimeType?: string | undefined; + }>, z.ZodObject; + }, { + /** + * A base64-encoded string representing the binary data of the item. + */ + blob: z.ZodString; + }>, "strip", z.ZodTypeAny, { + uri: string; + blob: string; + mimeType?: string | undefined; + }, { + uri: string; + blob: string; + mimeType?: string | undefined; + }>]>, "many">; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + contents: z.ZodArray; + }, { + /** + * The text of the item. This must only be set if the item can actually be represented as text (not binary data). + */ + text: z.ZodString; + }>, "strip", z.ZodTypeAny, { + text: string; + uri: string; + mimeType?: string | undefined; + }, { + text: string; + uri: string; + mimeType?: string | undefined; + }>, z.ZodObject; + }, { + /** + * A base64-encoded string representing the binary data of the item. + */ + blob: z.ZodString; + }>, "strip", z.ZodTypeAny, { + uri: string; + blob: string; + mimeType?: string | undefined; + }, { + uri: string; + blob: string; + mimeType?: string | undefined; + }>]>, "many">; +}>, z.ZodTypeAny, "passthrough">>; +/** + * An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client. + */ +export declare const ResourceListChangedNotificationSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/resources/list_changed">; +}>, "strip", z.ZodTypeAny, { + method: "notifications/resources/list_changed"; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "notifications/resources/list_changed"; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * Sent from the client to request resources/updated notifications from the server whenever a particular resource changes. + */ +export declare const SubscribeRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"resources/subscribe">; + params: z.ZodObject<{ + /** + * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + uri: string; + }, { + uri: string; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + uri: string; + }; + method: "resources/subscribe"; +}, { + params: { + uri: string; + }; + method: "resources/subscribe"; +}>; +/** + * Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request. + */ +export declare const UnsubscribeRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"resources/unsubscribe">; + params: z.ZodObject<{ + /** + * The URI of the resource to unsubscribe from. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + uri: string; + }, { + uri: string; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + uri: string; + }; + method: "resources/unsubscribe"; +}, { + params: { + uri: string; + }; + method: "resources/unsubscribe"; +}>; +/** + * A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request. + */ +export declare const ResourceUpdatedNotificationSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/resources/updated">; + params: z.ZodObject<{ + /** + * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + uri: string; + }, { + uri: string; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + uri: string; + }; + method: "notifications/resources/updated"; +}, { + params: { + uri: string; + }; + method: "notifications/resources/updated"; +}>; +/** + * Describes an argument that a prompt can accept. + */ +export declare const PromptArgumentSchema: z.ZodObject<{ + /** + * The name of the argument. + */ + name: z.ZodString; + /** + * A human-readable description of the argument. + */ + description: z.ZodOptional; + /** + * Whether this argument must be provided. + */ + required: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + required?: boolean | undefined; +}, { + name: string; + description?: string | undefined; + required?: boolean | undefined; +}>; +/** + * A prompt or prompt template that the server offers. + */ +export declare const PromptSchema: z.ZodObject<{ + /** + * The name of the prompt or prompt template. + */ + name: z.ZodString; + /** + * An optional description of what this prompt provides + */ + description: z.ZodOptional; + /** + * A list of arguments to use for templating the prompt. + */ + arguments: z.ZodOptional; + /** + * Whether this argument must be provided. + */ + required: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }>, "many">>; +}, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; +}, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; +}>; +/** + * Sent from the client to request a list of prompts and prompt templates the server has. + */ +export declare const ListPromptsRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"prompts/list">; +}>, "strip", z.ZodTypeAny, { + method: "prompts/list"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "prompts/list"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * The server's response to a prompts/list request from the client. + */ +export declare const ListPromptsResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + prompts: z.ZodArray; + /** + * A list of arguments to use for templating the prompt. + */ + arguments: z.ZodOptional; + /** + * Whether this argument must be provided. + */ + required: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }>, "many">>; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }>, "many">; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + prompts: z.ZodArray; + /** + * A list of arguments to use for templating the prompt. + */ + arguments: z.ZodOptional; + /** + * Whether this argument must be provided. + */ + required: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }>, "many">>; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + prompts: z.ZodArray; + /** + * A list of arguments to use for templating the prompt. + */ + arguments: z.ZodOptional; + /** + * Whether this argument must be provided. + */ + required: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }>, "many">>; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">>; +/** + * Used by the client to get a prompt provided by the server. + */ +export declare const GetPromptRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"prompts/get">; + params: z.ZodObject<{ + /** + * The name of the prompt or prompt template. + */ + name: z.ZodString; + /** + * Arguments to use for templating the prompt. + */ + arguments: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string; + arguments?: Record | undefined; + }, { + name: string; + arguments?: Record | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + name: string; + arguments?: Record | undefined; + }; + method: "prompts/get"; +}, { + params: { + name: string; + arguments?: Record | undefined; + }; + method: "prompts/get"; +}>; +/** + * The server's response to a prompts/get request from the client. + */ +export declare const GetPromptResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * An optional description for the prompt. + */ + description: z.ZodOptional; + messages: z.ZodArray; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; + }, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }>, "many">; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * An optional description for the prompt. + */ + description: z.ZodOptional; + messages: z.ZodArray; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; + }, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * An optional description for the prompt. + */ + description: z.ZodOptional; + messages: z.ZodArray; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; + }, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">>; +/** + * Definition for a tool the client can call. + */ +export declare const ToolSchema: z.ZodObject<{ + /** + * The name of the tool. + */ + name: z.ZodString; + /** + * A human-readable description of the tool. + */ + description: z.ZodOptional; + /** + * A JSON Schema object defining the expected parameters for the tool. + */ + inputSchema: z.ZodObject<{ + type: z.ZodLiteral<"object">; + properties: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; +}, "strip", z.ZodTypeAny, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; +}, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; +}>; +/** + * Sent from the client to request a list of tools the server has. + */ +export declare const ListToolsRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"tools/list">; +}>, "strip", z.ZodTypeAny, { + method: "tools/list"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "tools/list"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * The server's response to a tools/list request from the client. + */ +export declare const ListToolsResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + tools: z.ZodArray; + /** + * A JSON Schema object defining the expected parameters for the tool. + */ + inputSchema: z.ZodObject<{ + type: z.ZodLiteral<"object">; + properties: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + }, "strip", z.ZodTypeAny, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }>, "many">; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + tools: z.ZodArray; + /** + * A JSON Schema object defining the expected parameters for the tool. + */ + inputSchema: z.ZodObject<{ + type: z.ZodLiteral<"object">; + properties: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + }, "strip", z.ZodTypeAny, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + tools: z.ZodArray; + /** + * A JSON Schema object defining the expected parameters for the tool. + */ + inputSchema: z.ZodObject<{ + type: z.ZodLiteral<"object">; + properties: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + }, "strip", z.ZodTypeAny, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">>; +/** + * The server's response to a tool call. + */ +export declare const CallToolResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + toolResult: z.ZodUnknown; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + toolResult: z.ZodUnknown; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + toolResult: z.ZodUnknown; +}>, z.ZodTypeAny, "passthrough">>; +/** + * Used by the client to invoke a tool provided by the server. + */ +export declare const CallToolRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"tools/call">; + params: z.ZodObject<{ + name: z.ZodString; + arguments: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string; + arguments?: Record | undefined; + }, { + name: string; + arguments?: Record | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + name: string; + arguments?: Record | undefined; + }; + method: "tools/call"; +}, { + params: { + name: string; + arguments?: Record | undefined; + }; + method: "tools/call"; +}>; +/** + * An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client. + */ +export declare const ToolListChangedNotificationSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/tools/list_changed">; +}>, "strip", z.ZodTypeAny, { + method: "notifications/tools/list_changed"; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "notifications/tools/list_changed"; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>; +/** + * The severity of a log message. + */ +export declare const LoggingLevelSchema: z.ZodEnum<["debug", "info", "warning", "error"]>; +/** + * A request from the client to the server, to enable or adjust logging. + */ +export declare const SetLevelRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"logging/setLevel">; + params: z.ZodObject<{ + /** + * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message. + */ + level: z.ZodEnum<["debug", "info", "warning", "error"]>; + }, "strip", z.ZodTypeAny, { + level: "error" | "debug" | "info" | "warning"; + }, { + level: "error" | "debug" | "info" | "warning"; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + level: "error" | "debug" | "info" | "warning"; + }; + method: "logging/setLevel"; +}, { + params: { + level: "error" | "debug" | "info" | "warning"; + }; + method: "logging/setLevel"; +}>; +/** + * Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically. + */ +export declare const LoggingMessageNotificationSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/message">; + params: z.ZodObject<{ + /** + * The severity of this log message. + */ + level: z.ZodEnum<["debug", "info", "warning", "error"]>; + /** + * An optional name of the logger issuing this message. + */ + logger: z.ZodOptional; + /** + * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here. + */ + data: z.ZodUnknown; + }, "strip", z.ZodTypeAny, { + level: "error" | "debug" | "info" | "warning"; + data?: unknown; + logger?: string | undefined; + }, { + level: "error" | "debug" | "info" | "warning"; + data?: unknown; + logger?: string | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + level: "error" | "debug" | "info" | "warning"; + data?: unknown; + logger?: string | undefined; + }; + method: "notifications/message"; +}, { + params: { + level: "error" | "debug" | "info" | "warning"; + data?: unknown; + logger?: string | undefined; + }; + method: "notifications/message"; +}>; +/** + * A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it. + */ +export declare const CreateMessageRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"sampling/createMessage">; + params: z.ZodObject<{ + messages: z.ZodArray; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; + }, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }>, "many">; + /** + * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt. + */ + systemPrompt: z.ZodOptional; + /** + * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request. + */ + includeContext: z.ZodOptional>; + temperature: z.ZodOptional; + /** + * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested. + */ + maxTokens: z.ZodNumber; + stopSequences: z.ZodOptional>; + /** + * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific. + */ + metadata: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + messages: { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }[]; + maxTokens: number; + systemPrompt?: string | undefined; + includeContext?: "none" | "thisServer" | "allServers" | undefined; + temperature?: number | undefined; + stopSequences?: string[] | undefined; + metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + messages: { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }[]; + maxTokens: number; + systemPrompt?: string | undefined; + includeContext?: "none" | "thisServer" | "allServers" | undefined; + temperature?: number | undefined; + stopSequences?: string[] | undefined; + metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + messages: { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }[]; + maxTokens: number; + systemPrompt?: string | undefined; + includeContext?: "none" | "thisServer" | "allServers" | undefined; + temperature?: number | undefined; + stopSequences?: string[] | undefined; + metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + method: "sampling/createMessage"; +}, { + params: { + messages: { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }[]; + maxTokens: number; + systemPrompt?: string | undefined; + includeContext?: "none" | "thisServer" | "allServers" | undefined; + temperature?: number | undefined; + stopSequences?: string[] | undefined; + metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + method: "sampling/createMessage"; +}>; +/** + * The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it. + */ +export declare const CreateMessageResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * The name of the model that generated the message. + */ + model: z.ZodString; + /** + * The reason why sampling stopped. + */ + stopReason: z.ZodEnum<["endTurn", "stopSequence", "maxTokens"]>; + role: z.ZodEnum<["user", "assistant"]>; + content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * The name of the model that generated the message. + */ + model: z.ZodString; + /** + * The reason why sampling stopped. + */ + stopReason: z.ZodEnum<["endTurn", "stopSequence", "maxTokens"]>; + role: z.ZodEnum<["user", "assistant"]>; + content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * The name of the model that generated the message. + */ + model: z.ZodString; + /** + * The reason why sampling stopped. + */ + stopReason: z.ZodEnum<["endTurn", "stopSequence", "maxTokens"]>; + role: z.ZodEnum<["user", "assistant"]>; + content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; +}>, z.ZodTypeAny, "passthrough">>; +/** + * A reference to a resource or resource template definition. + */ +export declare const ResourceReferenceSchema: z.ZodObject<{ + type: z.ZodLiteral<"ref/resource">; + /** + * The URI or URI template of the resource. + */ + uri: z.ZodString; +}, "strip", z.ZodTypeAny, { + type: "ref/resource"; + uri: string; +}, { + type: "ref/resource"; + uri: string; +}>; +/** + * Identifies a prompt. + */ +export declare const PromptReferenceSchema: z.ZodObject<{ + type: z.ZodLiteral<"ref/prompt">; + /** + * The name of the prompt or prompt template + */ + name: z.ZodString; +}, "strip", z.ZodTypeAny, { + type: "ref/prompt"; + name: string; +}, { + type: "ref/prompt"; + name: string; +}>; +/** + * A request from the client to the server, to ask for completion options. + */ +export declare const CompleteRequestSchema: z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"completion/complete">; + params: z.ZodObject<{ + ref: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"ref/prompt">; + /** + * The name of the prompt or prompt template + */ + name: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "ref/prompt"; + name: string; + }, { + type: "ref/prompt"; + name: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"ref/resource">; + /** + * The URI or URI template of the resource. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "ref/resource"; + uri: string; + }, { + type: "ref/resource"; + uri: string; + }>]>; + /** + * The argument's information + */ + argument: z.ZodObject<{ + /** + * The name of the argument + */ + name: z.ZodString; + /** + * The value of the argument to use for completion matching. + */ + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + }, { + value: string; + name: string; + }>; + }, "strip", z.ZodTypeAny, { + ref: { + type: "ref/resource"; + uri: string; + } | { + type: "ref/prompt"; + name: string; + }; + argument: { + value: string; + name: string; + }; + }, { + ref: { + type: "ref/resource"; + uri: string; + } | { + type: "ref/prompt"; + name: string; + }; + argument: { + value: string; + name: string; + }; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + ref: { + type: "ref/resource"; + uri: string; + } | { + type: "ref/prompt"; + name: string; + }; + argument: { + value: string; + name: string; + }; + }; + method: "completion/complete"; +}, { + params: { + ref: { + type: "ref/resource"; + uri: string; + } | { + type: "ref/prompt"; + name: string; + }; + argument: { + value: string; + name: string; + }; + }; + method: "completion/complete"; +}>; +/** + * The server's response to a completion/complete request + */ +export declare const CompleteResultSchema: z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + completion: z.ZodObject<{ + /** + * An array of completion values. Must not exceed 100 items. + */ + values: z.ZodArray; + /** + * The total number of completion options available. This can exceed the number of values actually sent in the response. + */ + total: z.ZodOptional; + /** + * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. + */ + hasMore: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }>; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + completion: z.ZodObject<{ + /** + * An array of completion values. Must not exceed 100 items. + */ + values: z.ZodArray; + /** + * The total number of completion options available. This can exceed the number of values actually sent in the response. + */ + total: z.ZodOptional; + /** + * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. + */ + hasMore: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }>; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + completion: z.ZodObject<{ + /** + * An array of completion values. Must not exceed 100 items. + */ + values: z.ZodArray; + /** + * The total number of completion options available. This can exceed the number of values actually sent in the response. + */ + total: z.ZodOptional; + /** + * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. + */ + hasMore: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }>; +}>, z.ZodTypeAny, "passthrough">>; +export declare const ClientRequestSchema: z.ZodUnion<[z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"ping">; +}>, "strip", z.ZodTypeAny, { + method: "ping"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "ping"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"initialize">; + params: z.ZodObject<{ + /** + * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well. + */ + protocolVersion: z.ZodNumber; + capabilities: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the client supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the client supports sampling from an LLM. + */ + sampling: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + clientInfo: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; + }, "strip", z.ZodTypeAny, { + name: string; + version: string; + }, { + name: string; + version: string; + }>; + }, "strip", z.ZodTypeAny, { + protocolVersion: number; + capabilities: { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + clientInfo: { + name: string; + version: string; + }; + }, { + protocolVersion: number; + capabilities: { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + clientInfo: { + name: string; + version: string; + }; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + protocolVersion: number; + capabilities: { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + clientInfo: { + name: string; + version: string; + }; + }; + method: "initialize"; +}, { + params: { + protocolVersion: number; + capabilities: { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + sampling?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + clientInfo: { + name: string; + version: string; + }; + }; + method: "initialize"; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"completion/complete">; + params: z.ZodObject<{ + ref: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"ref/prompt">; + /** + * The name of the prompt or prompt template + */ + name: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "ref/prompt"; + name: string; + }, { + type: "ref/prompt"; + name: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"ref/resource">; + /** + * The URI or URI template of the resource. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "ref/resource"; + uri: string; + }, { + type: "ref/resource"; + uri: string; + }>]>; + /** + * The argument's information + */ + argument: z.ZodObject<{ + /** + * The name of the argument + */ + name: z.ZodString; + /** + * The value of the argument to use for completion matching. + */ + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + }, { + value: string; + name: string; + }>; + }, "strip", z.ZodTypeAny, { + ref: { + type: "ref/resource"; + uri: string; + } | { + type: "ref/prompt"; + name: string; + }; + argument: { + value: string; + name: string; + }; + }, { + ref: { + type: "ref/resource"; + uri: string; + } | { + type: "ref/prompt"; + name: string; + }; + argument: { + value: string; + name: string; + }; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + ref: { + type: "ref/resource"; + uri: string; + } | { + type: "ref/prompt"; + name: string; + }; + argument: { + value: string; + name: string; + }; + }; + method: "completion/complete"; +}, { + params: { + ref: { + type: "ref/resource"; + uri: string; + } | { + type: "ref/prompt"; + name: string; + }; + argument: { + value: string; + name: string; + }; + }; + method: "completion/complete"; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"logging/setLevel">; + params: z.ZodObject<{ + /** + * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message. + */ + level: z.ZodEnum<["debug", "info", "warning", "error"]>; + }, "strip", z.ZodTypeAny, { + level: "error" | "debug" | "info" | "warning"; + }, { + level: "error" | "debug" | "info" | "warning"; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + level: "error" | "debug" | "info" | "warning"; + }; + method: "logging/setLevel"; +}, { + params: { + level: "error" | "debug" | "info" | "warning"; + }; + method: "logging/setLevel"; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"prompts/get">; + params: z.ZodObject<{ + /** + * The name of the prompt or prompt template. + */ + name: z.ZodString; + /** + * Arguments to use for templating the prompt. + */ + arguments: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string; + arguments?: Record | undefined; + }, { + name: string; + arguments?: Record | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + name: string; + arguments?: Record | undefined; + }; + method: "prompts/get"; +}, { + params: { + name: string; + arguments?: Record | undefined; + }; + method: "prompts/get"; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"prompts/list">; +}>, "strip", z.ZodTypeAny, { + method: "prompts/list"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "prompts/list"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"resources/list">; +}>, "strip", z.ZodTypeAny, { + method: "resources/list"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "resources/list"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"resources/read">; + params: z.ZodObject<{ + /** + * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + uri: string; + }, { + uri: string; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + uri: string; + }; + method: "resources/read"; +}, { + params: { + uri: string; + }; + method: "resources/read"; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"resources/subscribe">; + params: z.ZodObject<{ + /** + * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + uri: string; + }, { + uri: string; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + uri: string; + }; + method: "resources/subscribe"; +}, { + params: { + uri: string; + }; + method: "resources/subscribe"; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"resources/unsubscribe">; + params: z.ZodObject<{ + /** + * The URI of the resource to unsubscribe from. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + uri: string; + }, { + uri: string; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + uri: string; + }; + method: "resources/unsubscribe"; +}, { + params: { + uri: string; + }; + method: "resources/unsubscribe"; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"tools/call">; + params: z.ZodObject<{ + name: z.ZodString; + arguments: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string; + arguments?: Record | undefined; + }, { + name: string; + arguments?: Record | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + name: string; + arguments?: Record | undefined; + }; + method: "tools/call"; +}, { + params: { + name: string; + arguments?: Record | undefined; + }; + method: "tools/call"; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"tools/list">; +}>, "strip", z.ZodTypeAny, { + method: "tools/list"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "tools/list"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>]>; +export declare const ClientNotificationSchema: z.ZodUnion<[z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/progress">; + params: z.ZodObject; + }, { + /** + * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding. + */ + progressToken: z.ZodUnion<[z.ZodString, z.ZodNumber]>; + }>, "strip", z.ZodTypeAny, { + progressToken: string | number; + progress: number; + total?: number | undefined; + }, { + progressToken: string | number; + progress: number; + total?: number | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + progressToken: string | number; + progress: number; + total?: number | undefined; + }; + method: "notifications/progress"; +}, { + params: { + progressToken: string | number; + progress: number; + total?: number | undefined; + }; + method: "notifications/progress"; +}>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/initialized">; +}>, "strip", z.ZodTypeAny, { + method: "notifications/initialized"; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "notifications/initialized"; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>]>; +export declare const ClientResultSchema: z.ZodUnion<[z.ZodObject<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, "strict", z.ZodTypeAny, { + _meta?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}, { + _meta?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * The name of the model that generated the message. + */ + model: z.ZodString; + /** + * The reason why sampling stopped. + */ + stopReason: z.ZodEnum<["endTurn", "stopSequence", "maxTokens"]>; + role: z.ZodEnum<["user", "assistant"]>; + content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * The name of the model that generated the message. + */ + model: z.ZodString; + /** + * The reason why sampling stopped. + */ + stopReason: z.ZodEnum<["endTurn", "stopSequence", "maxTokens"]>; + role: z.ZodEnum<["user", "assistant"]>; + content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * The name of the model that generated the message. + */ + model: z.ZodString; + /** + * The reason why sampling stopped. + */ + stopReason: z.ZodEnum<["endTurn", "stopSequence", "maxTokens"]>; + role: z.ZodEnum<["user", "assistant"]>; + content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; +}>, z.ZodTypeAny, "passthrough">>]>; +export declare const ServerRequestSchema: z.ZodUnion<[z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"ping">; +}>, "strip", z.ZodTypeAny, { + method: "ping"; + params?: z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "ping"; + params?: z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + _meta: z.ZodOptional>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.ZodOptional>; + }, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"sampling/createMessage">; + params: z.ZodObject<{ + messages: z.ZodArray; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; + }, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }>, "many">; + /** + * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt. + */ + systemPrompt: z.ZodOptional; + /** + * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request. + */ + includeContext: z.ZodOptional>; + temperature: z.ZodOptional; + /** + * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested. + */ + maxTokens: z.ZodNumber; + stopSequences: z.ZodOptional>; + /** + * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific. + */ + metadata: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + messages: { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }[]; + maxTokens: number; + systemPrompt?: string | undefined; + includeContext?: "none" | "thisServer" | "allServers" | undefined; + temperature?: number | undefined; + stopSequences?: string[] | undefined; + metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + messages: { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }[]; + maxTokens: number; + systemPrompt?: string | undefined; + includeContext?: "none" | "thisServer" | "allServers" | undefined; + temperature?: number | undefined; + stopSequences?: string[] | undefined; + metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + messages: { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }[]; + maxTokens: number; + systemPrompt?: string | undefined; + includeContext?: "none" | "thisServer" | "allServers" | undefined; + temperature?: number | undefined; + stopSequences?: string[] | undefined; + metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + method: "sampling/createMessage"; +}, { + params: { + messages: { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }[]; + maxTokens: number; + systemPrompt?: string | undefined; + includeContext?: "none" | "thisServer" | "allServers" | undefined; + temperature?: number | undefined; + stopSequences?: string[] | undefined; + metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + method: "sampling/createMessage"; +}>]>; +export declare const ServerNotificationSchema: z.ZodUnion<[z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/progress">; + params: z.ZodObject; + }, { + /** + * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding. + */ + progressToken: z.ZodUnion<[z.ZodString, z.ZodNumber]>; + }>, "strip", z.ZodTypeAny, { + progressToken: string | number; + progress: number; + total?: number | undefined; + }, { + progressToken: string | number; + progress: number; + total?: number | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + progressToken: string | number; + progress: number; + total?: number | undefined; + }; + method: "notifications/progress"; +}, { + params: { + progressToken: string | number; + progress: number; + total?: number | undefined; + }; + method: "notifications/progress"; +}>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/message">; + params: z.ZodObject<{ + /** + * The severity of this log message. + */ + level: z.ZodEnum<["debug", "info", "warning", "error"]>; + /** + * An optional name of the logger issuing this message. + */ + logger: z.ZodOptional; + /** + * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here. + */ + data: z.ZodUnknown; + }, "strip", z.ZodTypeAny, { + level: "error" | "debug" | "info" | "warning"; + data?: unknown; + logger?: string | undefined; + }, { + level: "error" | "debug" | "info" | "warning"; + data?: unknown; + logger?: string | undefined; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + level: "error" | "debug" | "info" | "warning"; + data?: unknown; + logger?: string | undefined; + }; + method: "notifications/message"; +}, { + params: { + level: "error" | "debug" | "info" | "warning"; + data?: unknown; + logger?: string | undefined; + }; + method: "notifications/message"; +}>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/resources/updated">; + params: z.ZodObject<{ + /** + * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to. + */ + uri: z.ZodString; + }, "strip", z.ZodTypeAny, { + uri: string; + }, { + uri: string; + }>; +}>, "strip", z.ZodTypeAny, { + params: { + uri: string; + }; + method: "notifications/resources/updated"; +}, { + params: { + uri: string; + }; + method: "notifications/resources/updated"; +}>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/resources/list_changed">; +}>, "strip", z.ZodTypeAny, { + method: "notifications/resources/list_changed"; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "notifications/resources/list_changed"; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough">>>; +}, { + method: z.ZodLiteral<"notifications/tools/list_changed">; +}>, "strip", z.ZodTypeAny, { + method: "notifications/tools/list_changed"; + params?: z.objectOutputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}, { + method: "notifications/tools/list_changed"; + params?: z.objectInputType<{ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, z.ZodTypeAny, "passthrough"> | undefined; +}>]>; +export declare const ServerResultSchema: z.ZodUnion<[z.ZodObject<{ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, "strict", z.ZodTypeAny, { + _meta?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}, { + _meta?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; +}>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * 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.ZodNumber; + capabilities: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the server supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server supports sending log messages to the client. + */ + logging: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any prompt templates. + */ + prompts: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any resources to read. + */ + resources: z.ZodOptional; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any tools to call. + */ + tools: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + serverInfo: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; + }, "strip", z.ZodTypeAny, { + name: string; + version: string; + }, { + name: string; + version: string; + }>; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * 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.ZodNumber; + capabilities: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the server supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server supports sending log messages to the client. + */ + logging: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any prompt templates. + */ + prompts: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any resources to read. + */ + resources: z.ZodOptional; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any tools to call. + */ + tools: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + serverInfo: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; + }, "strip", z.ZodTypeAny, { + name: string; + version: string; + }, { + name: string; + version: string; + }>; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * 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.ZodNumber; + capabilities: z.ZodObject<{ + /** + * Experimental, non-standard capabilities that the server supports. + */ + experimental: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server supports sending log messages to the client. + */ + logging: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any prompt templates. + */ + prompts: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any resources to read. + */ + resources: z.ZodOptional; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough">>>; + /** + * Present if the server offers any tools to call. + */ + tools: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + experimental?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectOutputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + experimental?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + logging?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + prompts?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + resources?: z.objectInputType<{ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.ZodOptional; + }, z.ZodTypeAny, "passthrough"> | undefined; + tools?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + serverInfo: z.ZodObject<{ + name: z.ZodString; + version: z.ZodString; + }, "strip", z.ZodTypeAny, { + name: string; + version: string; + }, { + name: string; + version: string; + }>; +}>, z.ZodTypeAny, "passthrough">>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + completion: z.ZodObject<{ + /** + * An array of completion values. Must not exceed 100 items. + */ + values: z.ZodArray; + /** + * The total number of completion options available. This can exceed the number of values actually sent in the response. + */ + total: z.ZodOptional; + /** + * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. + */ + hasMore: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }>; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + completion: z.ZodObject<{ + /** + * An array of completion values. Must not exceed 100 items. + */ + values: z.ZodArray; + /** + * The total number of completion options available. This can exceed the number of values actually sent in the response. + */ + total: z.ZodOptional; + /** + * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. + */ + hasMore: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }>; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + completion: z.ZodObject<{ + /** + * An array of completion values. Must not exceed 100 items. + */ + values: z.ZodArray; + /** + * The total number of completion options available. This can exceed the number of values actually sent in the response. + */ + total: z.ZodOptional; + /** + * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. + */ + hasMore: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }, { + values: string[]; + total?: number | undefined; + hasMore?: boolean | undefined; + }>; +}>, z.ZodTypeAny, "passthrough">>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * An optional description for the prompt. + */ + description: z.ZodOptional; + messages: z.ZodArray; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; + }, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }>, "many">; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * An optional description for the prompt. + */ + description: z.ZodOptional; + messages: z.ZodArray; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; + }, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + /** + * An optional description for the prompt. + */ + description: z.ZodOptional; + messages: z.ZodArray; + content: z.ZodUnion<[z.ZodObject<{ + type: z.ZodLiteral<"text">; + /** + * The text content of the message. + */ + text: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "text"; + text: string; + }, { + type: "text"; + text: string; + }>, z.ZodObject<{ + type: z.ZodLiteral<"image">; + /** + * The base64-encoded image data. + */ + data: z.ZodString; + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.ZodString; + }, "strip", z.ZodTypeAny, { + type: "image"; + data: string; + mimeType: string; + }, { + type: "image"; + data: string; + mimeType: string; + }>]>; + }, "strip", z.ZodTypeAny, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }, { + role: "user" | "assistant"; + content: { + type: "text"; + text: string; + } | { + type: "image"; + data: string; + mimeType: string; + }; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + prompts: z.ZodArray; + /** + * A list of arguments to use for templating the prompt. + */ + arguments: z.ZodOptional; + /** + * Whether this argument must be provided. + */ + required: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }>, "many">>; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }>, "many">; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + prompts: z.ZodArray; + /** + * A list of arguments to use for templating the prompt. + */ + arguments: z.ZodOptional; + /** + * Whether this argument must be provided. + */ + required: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }>, "many">>; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + prompts: z.ZodArray; + /** + * A list of arguments to use for templating the prompt. + */ + arguments: z.ZodOptional; + /** + * Whether this argument must be provided. + */ + required: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }, { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }>, "many">>; + }, "strip", z.ZodTypeAny, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }, { + name: string; + description?: string | undefined; + arguments?: { + name: string; + description?: string | undefined; + required?: boolean | undefined; + }[] | undefined; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + resourceTemplates: z.ZodOptional; + /** + * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; + resources: z.ZodOptional; + /** + * The MIME type of this resource, if known. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + resourceTemplates: z.ZodOptional; + /** + * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; + resources: z.ZodOptional; + /** + * The MIME type of this resource, if known. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + resourceTemplates: z.ZodOptional; + /** + * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uriTemplate: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; + resources: z.ZodOptional; + /** + * The MIME type of this resource, if known. + */ + mimeType: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }, { + name: string; + uri: string; + mimeType?: string | undefined; + description?: string | undefined; + }>, "many">>; +}>, z.ZodTypeAny, "passthrough">>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + contents: z.ZodArray; + }, { + /** + * The text of the item. This must only be set if the item can actually be represented as text (not binary data). + */ + text: z.ZodString; + }>, "strip", z.ZodTypeAny, { + text: string; + uri: string; + mimeType?: string | undefined; + }, { + text: string; + uri: string; + mimeType?: string | undefined; + }>, z.ZodObject; + }, { + /** + * A base64-encoded string representing the binary data of the item. + */ + blob: z.ZodString; + }>, "strip", z.ZodTypeAny, { + uri: string; + blob: string; + mimeType?: string | undefined; + }, { + uri: string; + blob: string; + mimeType?: string | undefined; + }>]>, "many">; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + contents: z.ZodArray; + }, { + /** + * The text of the item. This must only be set if the item can actually be represented as text (not binary data). + */ + text: z.ZodString; + }>, "strip", z.ZodTypeAny, { + text: string; + uri: string; + mimeType?: string | undefined; + }, { + text: string; + uri: string; + mimeType?: string | undefined; + }>, z.ZodObject; + }, { + /** + * A base64-encoded string representing the binary data of the item. + */ + blob: z.ZodString; + }>, "strip", z.ZodTypeAny, { + uri: string; + blob: string; + mimeType?: string | undefined; + }, { + uri: string; + blob: string; + mimeType?: string | undefined; + }>]>, "many">; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + contents: z.ZodArray; + }, { + /** + * The text of the item. This must only be set if the item can actually be represented as text (not binary data). + */ + text: z.ZodString; + }>, "strip", z.ZodTypeAny, { + text: string; + uri: string; + mimeType?: string | undefined; + }, { + text: string; + uri: string; + mimeType?: string | undefined; + }>, z.ZodObject; + }, { + /** + * A base64-encoded string representing the binary data of the item. + */ + blob: z.ZodString; + }>, "strip", z.ZodTypeAny, { + uri: string; + blob: string; + mimeType?: string | undefined; + }, { + uri: string; + blob: string; + mimeType?: string | undefined; + }>]>, "many">; +}>, z.ZodTypeAny, "passthrough">>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + toolResult: z.ZodUnknown; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + toolResult: z.ZodUnknown; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + toolResult: z.ZodUnknown; +}>, z.ZodTypeAny, "passthrough">>, z.ZodObject, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + tools: z.ZodArray; + /** + * A JSON Schema object defining the expected parameters for the tool. + */ + inputSchema: z.ZodObject<{ + type: z.ZodLiteral<"object">; + properties: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + }, "strip", z.ZodTypeAny, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }>, "many">; +}>, "passthrough", z.ZodTypeAny, z.objectOutputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + tools: z.ZodArray; + /** + * A JSON Schema object defining the expected parameters for the tool. + */ + inputSchema: z.ZodObject<{ + type: z.ZodLiteral<"object">; + properties: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + }, "strip", z.ZodTypeAny, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">, z.objectInputType, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; +}, { + tools: z.ZodArray; + /** + * A JSON Schema object defining the expected parameters for the tool. + */ + inputSchema: z.ZodObject<{ + type: z.ZodLiteral<"object">; + properties: z.ZodOptional, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>; + }, "strip", z.ZodTypeAny, { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }, { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }>; + }, "strip", z.ZodTypeAny, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }, { + name: string; + inputSchema: { + type: "object"; + properties?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; + }; + description?: string | undefined; + }>, "many">; +}>, z.ZodTypeAny, "passthrough">>]>; +export declare class McpError extends Error { + readonly code: number; + readonly data?: unknown; + constructor(code: number, message: string, data?: unknown); +} +export type ProgressToken = z.infer; +export type Request = z.infer; +export type Notification = z.infer; +export type Result = z.infer; +export type RequestId = z.infer; +export type JSONRPCRequest = z.infer; +export type JSONRPCNotification = z.infer; +export type JSONRPCResponse = z.infer; +export type JSONRPCError = z.infer; +export type JSONRPCMessage = z.infer; +export type EmptyResult = z.infer; +export type TextContent = z.infer; +export type ImageContent = z.infer; +export type SamplingMessage = z.infer; +export type Implementation = z.infer; +export type ClientCapabilities = z.infer; +export type InitializeRequest = z.infer; +export type ServerCapabilities = z.infer; +export type InitializeResult = z.infer; +export type InitializedNotification = z.infer; +export type PingRequest = z.infer; +export type Progress = z.infer; +export type ProgressNotification = z.infer; +export type ResourceContents = z.infer; +export type TextResourceContents = z.infer; +export type BlobResourceContents = z.infer; +export type Resource = z.infer; +export type ResourceTemplate = z.infer; +export type ListResourcesRequest = z.infer; +export type ListResourcesResult = z.infer; +export type ReadResourceRequest = z.infer; +export type ReadResourceResult = z.infer; +export type ResourceListChangedNotification = z.infer; +export type SubscribeRequest = z.infer; +export type UnsubscribeRequest = z.infer; +export type ResourceUpdatedNotification = z.infer; +export type PromptArgument = z.infer; +export type Prompt = z.infer; +export type ListPromptsRequest = z.infer; +export type ListPromptsResult = z.infer; +export type GetPromptRequest = z.infer; +export type GetPromptResult = z.infer; +export type Tool = z.infer; +export type ListToolsRequest = z.infer; +export type ListToolsResult = z.infer; +export type CallToolResult = z.infer; +export type CallToolRequest = z.infer; +export type ToolListChangedNotification = z.infer; +export type LoggingLevel = z.infer; +export type SetLevelRequest = z.infer; +export type LoggingMessageNotification = z.infer; +export type CreateMessageRequest = z.infer; +export type CreateMessageResult = z.infer; +export type ResourceReference = z.infer; +export type PromptReference = z.infer; +export type CompleteRequest = z.infer; +export type CompleteResult = z.infer; +export type ClientRequest = z.infer; +export type ClientNotification = z.infer; +export type ClientResult = z.infer; +export type ServerRequest = z.infer; +export type ServerNotification = z.infer; +export type ServerResult = z.infer; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/types.d.ts.map b/dist/types.d.ts.map new file mode 100644 index 00000000..a2b3885c --- /dev/null +++ b/dist/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,mBAAmB,wCAA0C,CAAC;AAE3E,eAAO,MAAM,aAAa;;;;YAQZ;;eAEG;;;YAFH;;eAEG;;;YAFH;;eAEG;;;;;YAFH;;eAEG;;;YAFH;;eAEG;;;YAFH;;eAEG;;;;;YAFH;;eAEG;;;YAFH;;eAEG;;;YAFH;;eAEG;;;;;;;;YAFH;;eAEG;;;YAFH;;eAEG;;;YAFH;;eAEG;;;;;;;;YAFH;;eAEG;;;YAFH;;eAEG;;;YAFH;;eAEG;;;;EAQf,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;QAKvB;;WAEG;;;QAFH;;WAEG;;;QAFH;;WAEG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,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/types.js b/dist/types.js new file mode 100644 index 00000000..479c9b9b --- /dev/null +++ b/dist/types.js @@ -0,0 +1,738 @@ +import { z } from "zod"; +/* JSON-RPC types */ +export const JSONRPC_VERSION = "2.0"; +/** + * A progress token, used to associate progress notifications with the original request. + */ +export const ProgressTokenSchema = z.union([z.string(), z.number().int()]); +export const RequestSchema = z.object({ + method: z.string(), + params: z.optional(z + .object({ + _meta: z.optional(z + .object({ + /** + * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. + */ + progressToken: z.optional(ProgressTokenSchema), + }) + .passthrough()), + }) + .passthrough()), +}); +export const NotificationSchema = z.object({ + method: z.string(), + params: z.optional(z + .object({ + /** + * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. + */ + _meta: z.optional(z.object({}).passthrough()), + }) + .passthrough()), +}); +export const ResultSchema = z + .object({ + /** + * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. + */ + _meta: z.optional(z.object({}).passthrough()), +}) + .passthrough(); +/** + * A uniquely identifying ID for a request in JSON-RPC. + */ +export const RequestIdSchema = z.union([z.string(), z.number().int()]); +/** + * A request that expects a response. + */ +export const JSONRPCRequestSchema = RequestSchema.extend({ + jsonrpc: z.literal(JSONRPC_VERSION), + id: RequestIdSchema, +}).strict(); +/** + * A notification which does not expect a response. + */ +export const JSONRPCNotificationSchema = NotificationSchema.extend({ + jsonrpc: z.literal(JSONRPC_VERSION), +}).strict(); +/** + * A successful (non-error) response to a request. + */ +export const JSONRPCResponseSchema = z + .object({ + jsonrpc: z.literal(JSONRPC_VERSION), + id: RequestIdSchema, + result: ResultSchema, +}) + .strict(); +/** + * An incomplete set of error codes that may appear in JSON-RPC responses. + */ +export var ErrorCode; +(function (ErrorCode) { + // SDK error codes + ErrorCode[ErrorCode["ConnectionClosed"] = -1] = "ConnectionClosed"; + // Standard JSON-RPC error codes + ErrorCode[ErrorCode["ParseError"] = -32700] = "ParseError"; + ErrorCode[ErrorCode["InvalidRequest"] = -32600] = "InvalidRequest"; + ErrorCode[ErrorCode["MethodNotFound"] = -32601] = "MethodNotFound"; + ErrorCode[ErrorCode["InvalidParams"] = -32602] = "InvalidParams"; + ErrorCode[ErrorCode["InternalError"] = -32603] = "InternalError"; +})(ErrorCode || (ErrorCode = {})); +/** + * A response to a request that indicates an error occurred. + */ +export const JSONRPCErrorSchema = z + .object({ + jsonrpc: z.literal(JSONRPC_VERSION), + id: RequestIdSchema, + error: z.object({ + /** + * The error type that occurred. + */ + code: z.number().int(), + /** + * A short description of the error. The message SHOULD be limited to a concise single sentence. + */ + message: z.string(), + /** + * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). + */ + data: z.optional(z.unknown()), + }), +}) + .strict(); +export const JSONRPCMessageSchema = z.union([ + JSONRPCRequestSchema, + JSONRPCNotificationSchema, + JSONRPCResponseSchema, + JSONRPCErrorSchema, +]); +/* Empty result */ +/** + * A response that indicates success but carries no data. + */ +export const EmptyResultSchema = ResultSchema.strict(); +/* Initialization */ +export const PROTOCOL_VERSION = 1; +/** + * Text provided to or from an LLM. + */ +export const TextContentSchema = z.object({ + type: z.literal("text"), + /** + * The text content of the message. + */ + text: z.string(), +}); +/** + * An image provided to or from an LLM. + */ +export const ImageContentSchema = z.object({ + type: z.literal("image"), + /** + * The base64-encoded image data. + */ + data: z.string().base64(), + /** + * The MIME type of the image. Different providers may support different image types. + */ + mimeType: z.string(), +}); +/** + * Describes a message issued to or received from an LLM API. + */ +export const SamplingMessageSchema = z.object({ + role: z.enum(["user", "assistant"]), + content: z.union([TextContentSchema, ImageContentSchema]), +}); +/** + * Describes the name and version of an MCP implementation. + */ +export const ImplementationSchema = z.object({ + name: z.string(), + version: z.string(), +}); +/** + * Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities. + */ +export const ClientCapabilitiesSchema = z.object({ + /** + * Experimental, non-standard capabilities that the client supports. + */ + experimental: z.optional(z.object({}).passthrough()), + /** + * Present if the client supports sampling from an LLM. + */ + sampling: z.optional(z.object({}).passthrough()), +}); +/** + * This request is sent from the client to the server when it first connects, asking it to begin initialization. + */ +export const InitializeRequestSchema = RequestSchema.extend({ + method: z.literal("initialize"), + params: z.object({ + /** + * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well. + */ + protocolVersion: z.number().int(), + capabilities: ClientCapabilitiesSchema, + clientInfo: ImplementationSchema, + }), +}); +/** + * Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities. + */ +export const ServerCapabilitiesSchema = z.object({ + /** + * Experimental, non-standard capabilities that the server supports. + */ + experimental: z.optional(z.object({}).passthrough()), + /** + * Present if the server supports sending log messages to the client. + */ + logging: z.optional(z.object({}).passthrough()), + /** + * Present if the server offers any prompt templates. + */ + prompts: z.optional(z.object({}).passthrough()), + /** + * Present if the server offers any resources to read. + */ + resources: z.optional(z + .object({ + /** + * Whether this server supports subscribing to resource updates. + */ + subscribe: z.optional(z.boolean()), + }) + .passthrough()), + /** + * Present if the server offers any tools to call. + */ + tools: z.optional(z.object({}).passthrough()), +}); +/** + * After receiving an initialize request from the client, the server sends this response. + */ +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.number().int(), + capabilities: ServerCapabilitiesSchema, + serverInfo: ImplementationSchema, +}); +/** + * This notification is sent from the client to the server after initialization has finished. + */ +export const InitializedNotificationSchema = NotificationSchema.extend({ + method: z.literal("notifications/initialized"), +}); +/* Ping */ +/** + * A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected. + */ +export const PingRequestSchema = RequestSchema.extend({ + method: z.literal("ping"), +}); +/* Progress notifications */ +export const ProgressSchema = z.object({ + /** + * The progress thus far. This should increase every time progress is made, even if the total is unknown. + */ + progress: z.number(), + /** + * Total number of items to process (or total progress required), if known. + */ + total: z.optional(z.number()), +}); +/** + * An out-of-band notification used to inform the receiver of a progress update for a long-running request. + */ +export const ProgressNotificationSchema = NotificationSchema.extend({ + method: z.literal("notifications/progress"), + params: ProgressSchema.extend({ + /** + * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding. + */ + progressToken: ProgressTokenSchema, + }), +}); +/* Resources */ +/** + * The contents of a specific resource or sub-resource. + */ +export const ResourceContentsSchema = z.object({ + /** + * The URI of this resource. + */ + uri: z.string().url(), + /** + * The MIME type of this resource, if known. + */ + mimeType: z.optional(z.string()), +}); +export const TextResourceContentsSchema = ResourceContentsSchema.extend({ + /** + * The text of the item. This must only be set if the item can actually be represented as text (not binary data). + */ + text: z.string(), +}); +export const BlobResourceContentsSchema = ResourceContentsSchema.extend({ + /** + * A base64-encoded string representing the binary data of the item. + */ + blob: z.string().base64(), +}); +/** + * A known resource that the server is capable of reading. + */ +export const ResourceSchema = z.object({ + /** + * The URI of this resource. + */ + uri: z.string().url(), + /** + * A human-readable name for this resource. + * + * This can be used by clients to populate UI elements. + */ + name: z.string(), + /** + * A description of what this resource represents. + * + * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model. + */ + description: z.optional(z.string()), + /** + * The MIME type of this resource, if known. + */ + mimeType: z.optional(z.string()), +}); +/** + * A template description for resources available on the server. + */ +export const ResourceTemplateSchema = z.object({ + /** + * A URI template (according to RFC 6570) that can be used to construct resource URIs. + */ + uriTemplate: z.string(), + /** + * A human-readable name for the type of resource this template refers to. + * + * This can be used by clients to populate UI elements. + */ + name: z.string(), + /** + * A description of what this template is for. + * + * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model. + */ + description: z.optional(z.string()), + /** + * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. + */ + mimeType: z.optional(z.string()), +}); +/** + * Sent from the client to request a list of resources the server has. + */ +export const ListResourcesRequestSchema = RequestSchema.extend({ + method: z.literal("resources/list"), +}); +/** + * The server's response to a resources/list request from the client. + */ +export const ListResourcesResultSchema = ResultSchema.extend({ + resourceTemplates: z.optional(z.array(ResourceTemplateSchema)), + resources: z.optional(z.array(ResourceSchema)), +}); +/** + * Sent from the client to the server, to read a specific resource URI. + */ +export const ReadResourceRequestSchema = RequestSchema.extend({ + method: z.literal("resources/read"), + params: z.object({ + /** + * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it. + */ + uri: z.string().url(), + }), +}); +/** + * The server's response to a resources/read request from the client. + */ +export const ReadResourceResultSchema = ResultSchema.extend({ + contents: z.array(z.union([TextResourceContentsSchema, BlobResourceContentsSchema])), +}); +/** + * An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client. + */ +export const ResourceListChangedNotificationSchema = NotificationSchema.extend({ + method: z.literal("notifications/resources/list_changed"), +}); +/** + * Sent from the client to request resources/updated notifications from the server whenever a particular resource changes. + */ +export const SubscribeRequestSchema = RequestSchema.extend({ + method: z.literal("resources/subscribe"), + params: z.object({ + /** + * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it. + */ + uri: z.string().url(), + }), +}); +/** + * Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request. + */ +export const UnsubscribeRequestSchema = RequestSchema.extend({ + method: z.literal("resources/unsubscribe"), + params: z.object({ + /** + * The URI of the resource to unsubscribe from. + */ + uri: z.string().url(), + }), +}); +/** + * A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request. + */ +export const ResourceUpdatedNotificationSchema = NotificationSchema.extend({ + method: z.literal("notifications/resources/updated"), + params: z.object({ + /** + * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to. + */ + uri: z.string().url(), + }), +}); +/* Prompts */ +/** + * Describes an argument that a prompt can accept. + */ +export const PromptArgumentSchema = z.object({ + /** + * The name of the argument. + */ + name: z.string(), + /** + * A human-readable description of the argument. + */ + description: z.optional(z.string()), + /** + * Whether this argument must be provided. + */ + required: z.optional(z.boolean()), +}); +/** + * A prompt or prompt template that the server offers. + */ +export const PromptSchema = z.object({ + /** + * The name of the prompt or prompt template. + */ + name: z.string(), + /** + * An optional description of what this prompt provides + */ + description: z.optional(z.string()), + /** + * A list of arguments to use for templating the prompt. + */ + arguments: z.optional(z.array(PromptArgumentSchema)), +}); +/** + * Sent from the client to request a list of prompts and prompt templates the server has. + */ +export const ListPromptsRequestSchema = RequestSchema.extend({ + method: z.literal("prompts/list"), +}); +/** + * The server's response to a prompts/list request from the client. + */ +export const ListPromptsResultSchema = ResultSchema.extend({ + prompts: z.array(PromptSchema), +}); +/** + * Used by the client to get a prompt provided by the server. + */ +export const GetPromptRequestSchema = RequestSchema.extend({ + method: z.literal("prompts/get"), + params: z.object({ + /** + * The name of the prompt or prompt template. + */ + name: z.string(), + /** + * Arguments to use for templating the prompt. + */ + arguments: z.optional(z.record(z.string())), + }), +}); +/** + * The server's response to a prompts/get request from the client. + */ +export const GetPromptResultSchema = ResultSchema.extend({ + /** + * An optional description for the prompt. + */ + description: z.optional(z.string()), + messages: z.array(SamplingMessageSchema), +}); +/* Tools */ +/** + * Definition for a tool the client can call. + */ +export const ToolSchema = z.object({ + /** + * The name of the tool. + */ + name: z.string(), + /** + * A human-readable description of the tool. + */ + description: z.optional(z.string()), + /** + * A JSON Schema object defining the expected parameters for the tool. + */ + inputSchema: z.object({ + type: z.literal("object"), + properties: z.optional(z.object({}).passthrough()), + }), +}); +/** + * Sent from the client to request a list of tools the server has. + */ +export const ListToolsRequestSchema = RequestSchema.extend({ + method: z.literal("tools/list"), +}); +/** + * The server's response to a tools/list request from the client. + */ +export const ListToolsResultSchema = ResultSchema.extend({ + tools: z.array(ToolSchema), +}); +/** + * The server's response to a tool call. + */ +export const CallToolResultSchema = ResultSchema.extend({ + toolResult: z.unknown(), +}); +/** + * Used by the client to invoke a tool provided by the server. + */ +export const CallToolRequestSchema = RequestSchema.extend({ + method: z.literal("tools/call"), + params: z.object({ + name: z.string(), + arguments: z.optional(z.record(z.unknown())), + }), +}); +/** + * An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client. + */ +export const ToolListChangedNotificationSchema = NotificationSchema.extend({ + method: z.literal("notifications/tools/list_changed"), +}); +/* Logging */ +/** + * The severity of a log message. + */ +export const LoggingLevelSchema = z.enum(["debug", "info", "warning", "error"]); +/** + * A request from the client to the server, to enable or adjust logging. + */ +export const SetLevelRequestSchema = RequestSchema.extend({ + method: z.literal("logging/setLevel"), + params: z.object({ + /** + * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message. + */ + level: LoggingLevelSchema, + }), +}); +/** + * Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically. + */ +export const LoggingMessageNotificationSchema = NotificationSchema.extend({ + method: z.literal("notifications/message"), + params: z.object({ + /** + * The severity of this log message. + */ + level: LoggingLevelSchema, + /** + * An optional name of the logger issuing this message. + */ + logger: z.optional(z.string()), + /** + * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here. + */ + data: z.unknown(), + }), +}); +/* Sampling */ +/** + * A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it. + */ +export const CreateMessageRequestSchema = RequestSchema.extend({ + method: z.literal("sampling/createMessage"), + params: z.object({ + messages: z.array(SamplingMessageSchema), + /** + * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt. + */ + systemPrompt: z.optional(z.string()), + /** + * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request. + */ + includeContext: z.optional(z.enum(["none", "thisServer", "allServers"])), + temperature: z.optional(z.number()), + /** + * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested. + */ + maxTokens: z.number().int(), + stopSequences: z.optional(z.array(z.string())), + /** + * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific. + */ + metadata: z.optional(z.object({}).passthrough()), + }), +}); +/** + * The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it. + */ +export const CreateMessageResultSchema = ResultSchema.extend({ + /** + * The name of the model that generated the message. + */ + model: z.string(), + /** + * The reason why sampling stopped. + */ + stopReason: z.enum(["endTurn", "stopSequence", "maxTokens"]), + role: z.enum(["user", "assistant"]), + content: z.discriminatedUnion("type", [ + TextContentSchema, + ImageContentSchema, + ]), +}); +/* Autocomplete */ +/** + * A reference to a resource or resource template definition. + */ +export const ResourceReferenceSchema = z.object({ + type: z.literal("ref/resource"), + /** + * The URI or URI template of the resource. + */ + uri: z.string(), +}); +/** + * Identifies a prompt. + */ +export const PromptReferenceSchema = z.object({ + type: z.literal("ref/prompt"), + /** + * The name of the prompt or prompt template + */ + name: z.string(), +}); +/** + * A request from the client to the server, to ask for completion options. + */ +export const CompleteRequestSchema = RequestSchema.extend({ + method: z.literal("completion/complete"), + params: z.object({ + ref: z.union([PromptReferenceSchema, ResourceReferenceSchema]), + /** + * The argument's information + */ + argument: z.object({ + /** + * The name of the argument + */ + name: z.string(), + /** + * The value of the argument to use for completion matching. + */ + value: z.string(), + }), + }), +}); +/** + * The server's response to a completion/complete request + */ +export const CompleteResultSchema = ResultSchema.extend({ + completion: z.object({ + /** + * An array of completion values. Must not exceed 100 items. + */ + values: z.array(z.string()).max(100), + /** + * The total number of completion options available. This can exceed the number of values actually sent in the response. + */ + total: z.optional(z.number().int()), + /** + * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. + */ + hasMore: z.optional(z.boolean()), + }), +}); +/* Client messages */ +export const ClientRequestSchema = z.union([ + PingRequestSchema, + InitializeRequestSchema, + CompleteRequestSchema, + SetLevelRequestSchema, + GetPromptRequestSchema, + ListPromptsRequestSchema, + ListResourcesRequestSchema, + ReadResourceRequestSchema, + SubscribeRequestSchema, + UnsubscribeRequestSchema, + CallToolRequestSchema, + ListToolsRequestSchema, +]); +export const ClientNotificationSchema = z.union([ + ProgressNotificationSchema, + InitializedNotificationSchema, +]); +export const ClientResultSchema = z.union([ + EmptyResultSchema, + CreateMessageResultSchema, +]); +/* Server messages */ +export const ServerRequestSchema = z.union([ + PingRequestSchema, + CreateMessageRequestSchema, +]); +export const ServerNotificationSchema = z.union([ + ProgressNotificationSchema, + LoggingMessageNotificationSchema, + ResourceUpdatedNotificationSchema, + ResourceListChangedNotificationSchema, + ToolListChangedNotificationSchema, +]); +export const ServerResultSchema = z.union([ + EmptyResultSchema, + InitializeResultSchema, + CompleteResultSchema, + GetPromptResultSchema, + ListPromptsResultSchema, + ListResourcesResultSchema, + ReadResourceResultSchema, + CallToolResultSchema, + ListToolsResultSchema, +]); +export class McpError extends Error { + constructor(code, message, data) { + super(`MCP error ${code}: ${message}`); + this.code = code; + this.data = data; + } +} +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/dist/types.js.map b/dist/types.js.map new file mode 100644 index 00000000..4faf5293 --- /dev/null +++ b/dist/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAoB;AACpB,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,QAAQ,CAChB,CAAC;SACE,MAAM,CAAC;QACN,KAAK,EAAE,CAAC,CAAC,QAAQ,CACf,CAAC;aACE,MAAM,CAAC;YACN;;eAEG;YACH,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;SAC/C,CAAC;aACD,WAAW,EAAE,CACjB;KACF,CAAC;SACD,WAAW,EAAE,CACjB;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,QAAQ,CAChB,CAAC;SACE,MAAM,CAAC;QACN;;WAEG;QACH,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;KAC9C,CAAC;SACD,WAAW,EAAE,CACjB;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC;KAC1B,MAAM,CAAC;IACN;;OAEG;IAC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dist/types/index.d.ts deleted file mode 100644 index 99b95423..00000000 --- a/dist/types/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ProgressNotification, PingRequest } from "./schema.js"; -export * from "./schema.js"; -export declare const CONNECTION_CLOSED_ERROR = -1; -export declare class McpError extends Error { - readonly code: number; - readonly data?: unknown; - constructor(code: number, message: string, data?: unknown); -} -export type Progress = Pick; -export declare const PROGRESS_NOTIFICATION_METHOD: ProgressNotification["method"]; -export declare const PING_REQUEST_METHOD: PingRequest["method"]; -export type RequestId = string | number; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/types/index.d.ts.map b/dist/types/index.d.ts.map deleted file mode 100644 index edd54200..00000000 --- a/dist/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChE,cAAc,aAAa,CAAC;AAE5B,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,qBAAa,QAAS,SAAQ,KAAK;aAEf,IAAI,EAAE,MAAM;aAEZ,IAAI,CAAC,EAAE,OAAO;gBAFd,IAAI,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACC,IAAI,CAAC,EAAE,OAAO;CAIjC;AAED,MAAM,MAAM,QAAQ,GAAG,IAAI,CACzB,oBAAoB,CAAC,QAAQ,CAAC,EAC9B,UAAU,GAAG,OAAO,CACrB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,oBAAoB,CAAC,QAAQ,CAC9C,CAAC;AAC3B,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,QAAQ,CAAU,CAAC;AAEjE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/types/index.js b/dist/types/index.js deleted file mode 100644 index c2d3863d..00000000 --- a/dist/types/index.js +++ /dev/null @@ -1,12 +0,0 @@ -export * from "./schema.js"; -export const CONNECTION_CLOSED_ERROR = -1; -export class McpError extends Error { - constructor(code, message, data) { - super(`MCP error ${code}: ${message}`); - this.code = code; - this.data = data; - } -} -export const PROGRESS_NOTIFICATION_METHOD = "notifications/progress"; -export const PING_REQUEST_METHOD = "ping"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/types/index.js.map b/dist/types/index.js.map deleted file mode 100644 index 54f70b41..00000000 --- a/dist/types/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAE5B,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,CAAC;AAE1C,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,YACkB,IAAY,EAC5B,OAAe,EACC,IAAc;QAE9B,KAAK,CAAC,aAAa,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC;QAJvB,SAAI,GAAJ,IAAI,CAAQ;QAEZ,SAAI,GAAJ,IAAI,CAAU;IAGhC,CAAC;CACF;AAOD,MAAM,CAAC,MAAM,4BAA4B,GACvC,wBAAwB,CAAC;AAC3B,MAAM,CAAC,MAAM,mBAAmB,GAA0B,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/types/schema.d.ts b/dist/types/schema.d.ts deleted file mode 100644 index 9a47ef65..00000000 --- a/dist/types/schema.d.ts +++ /dev/null @@ -1,672 +0,0 @@ -export type JSONRPCMessage = JSONRPCRequest | JSONRPCNotification | JSONRPCResponse | JSONRPCError; -export declare const JSONRPC_VERSION = "2.0"; -/** - * A progress token, used to associate progress notifications with the original request. - */ -export type ProgressToken = string | number; -export interface Request { - method: string; - params?: { - _meta?: { - /** - * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications. - */ - progressToken?: ProgressToken; - }; - [key: string]: unknown; - }; -} -export interface Notification { - method: string; - params?: { - /** - * This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications. - */ - _meta?: { - [key: string]: unknown; - }; - [key: string]: unknown; - }; -} -export interface Result { - /** - * This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses. - */ - _meta?: { - [key: string]: unknown; - }; - [key: string]: unknown; -} -/** - * A uniquely identifying ID for a request in JSON-RPC. - */ -export type RequestId = string | number; -/** - * A request that expects a response. - */ -export interface JSONRPCRequest extends Request { - jsonrpc: typeof JSONRPC_VERSION; - id: RequestId; -} -/** - * A notification which does not expect a response. - */ -export interface JSONRPCNotification extends Notification { - jsonrpc: typeof JSONRPC_VERSION; -} -/** - * A successful (non-error) response to a request. - */ -export interface JSONRPCResponse { - jsonrpc: typeof JSONRPC_VERSION; - id: RequestId; - result: Result; -} -export declare const PARSE_ERROR = -32700; -export declare const INVALID_REQUEST = -32600; -export declare const METHOD_NOT_FOUND = -32601; -export declare const INVALID_PARAMS = -32602; -export declare const INTERNAL_ERROR = -32603; -/** - * A response to a request that indicates an error occurred. - */ -export interface JSONRPCError { - jsonrpc: typeof JSONRPC_VERSION; - id: RequestId; - error: { - /** - * The error type that occurred. - */ - code: number; - /** - * A short description of the error. The message SHOULD be limited to a concise single sentence. - */ - message: string; - /** - * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.). - */ - data?: unknown; - }; -} -/** - * A response that indicates success but carries no data. - */ -export type EmptyResult = Result; -export declare const PROTOCOL_VERSION = 1; -/** - * This request is sent from the client to the server when it first connects, asking it to begin initialization. - */ -export interface InitializeRequest extends Request { - method: "initialize"; - params: { - /** - * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well. - */ - protocolVersion: typeof PROTOCOL_VERSION; - capabilities: ClientCapabilities; - clientInfo: Implementation; - }; -} -/** - * After receiving an initialize request from the client, the server sends this response. - */ -export interface InitializeResult extends Result { - /** - * 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: typeof PROTOCOL_VERSION; - capabilities: ServerCapabilities; - serverInfo: Implementation; -} -/** - * This notification is sent from the client to the server after initialization has finished. - */ -export interface InitializedNotification extends Notification { - method: "notifications/initialized"; -} -/** - * Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities. - */ -export interface ClientCapabilities { - /** - * Experimental, non-standard capabilities that the client supports. - */ - experimental?: { - [key: string]: object; - }; - /** - * Present if the client supports sampling from an LLM. - */ - sampling?: object; -} -/** - * Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities. - */ -export interface ServerCapabilities { - /** - * Experimental, non-standard capabilities that the server supports. - */ - experimental?: { - [key: string]: object; - }; - /** - * Present if the server supports sending log messages to the client. - */ - logging?: object; - /** - * Present if the server offers any prompt templates. - */ - prompts?: object; - /** - * Present if the server offers any resources to read. - */ - resources?: { - /** - * Whether this server supports subscribing to resource updates. - */ - subscribe?: boolean; - }; - /** - * Present if the server offers any tools to call. - */ - tools?: object; -} -/** - * Describes the name and version of an MCP implementation. - */ -export interface Implementation { - name: string; - version: string; -} -/** - * A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected. - */ -export interface PingRequest extends Request { - method: "ping"; -} -/** - * An out-of-band notification used to inform the receiver of a progress update for a long-running request. - */ -export interface ProgressNotification extends Notification { - method: "notifications/progress"; - params: { - /** - * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding. - */ - progressToken: ProgressToken; - /** - * The progress thus far. This should increase every time progress is made, even if the total is unknown. - * - * @TJS-type number - */ - progress: number; - /** - * Total number of items to process (or total progress required), if known. - * - * @TJS-type number - */ - total?: number; - }; -} -/** - * Sent from the client to request a list of resources the server has. - */ -export interface ListResourcesRequest extends Request { - method: "resources/list"; -} -/** - * The server's response to a resources/list request from the client. - */ -export interface ListResourcesResult extends Result { - resourceTemplates?: ResourceTemplate[]; - resources?: Resource[]; -} -/** - * Sent from the client to the server, to read a specific resource URI. - */ -export interface ReadResourceRequest extends Request { - method: "resources/read"; - params: { - /** - * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it. - * - * @format uri - */ - uri: string; - }; -} -/** - * The server's response to a resources/read request from the client. - */ -export interface ReadResourceResult extends Result { - contents: (TextResourceContents | BlobResourceContents)[]; -} -/** - * An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client. - */ -export interface ResourceListChangedNotification extends Notification { - method: "notifications/resources/list_changed"; -} -/** - * Sent from the client to request resources/updated notifications from the server whenever a particular resource changes. - */ -export interface SubscribeRequest extends Request { - method: "resources/subscribe"; - params: { - /** - * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it. - * - * @format uri - */ - uri: string; - }; -} -/** - * Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request. - */ -export interface UnsubscribeRequest extends Request { - method: "resources/unsubscribe"; - params: { - /** - * The URI of the resource to unsubscribe from. - * - * @format uri - */ - uri: string; - }; -} -/** - * A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request. - */ -export interface ResourceUpdatedNotification extends Notification { - method: "notifications/resources/updated"; - params: { - /** - * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to. - * - * @format uri - */ - uri: string; - }; -} -/** - * A known resource that the server is capable of reading. - */ -export interface Resource { - /** - * The URI of this resource. - * - * @format uri - */ - uri: string; - /** - * The MIME type of this resource, if known. - */ - mimeType?: string; -} -/** - * A template description for resources available on the server. - */ -export interface ResourceTemplate { - /** - * A URI template (according to RFC 6570) that can be used to construct resource URIs. - * - * @format uri-template - */ - uriTemplate: string; - /** - * A human-readable name for the type of resource this template refers to. - */ - name?: string; - /** - * A human-readable description of what this template is for. - */ - description?: string; - /** - * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type. - */ - mimeType?: string; -} -/** - * The contents of a specific resource or sub-resource. - */ -export interface ResourceContents { - /** - * The URI of this resource. - * - * @format uri - */ - uri: string; - /** - * The MIME type of this resource, if known. - */ - mimeType?: string; -} -export interface TextResourceContents extends ResourceContents { - /** - * The text of the item. This must only be set if the item can actually be represented as text (not binary data). - */ - text: string; -} -export interface BlobResourceContents extends ResourceContents { - /** - * A base64-encoded string representing the binary data of the item. - * - * @format byte - */ - blob: string; -} -/** - * Sent from the client to request a list of prompts and prompt templates the server has. - */ -export interface ListPromptsRequest extends Request { - method: "prompts/list"; -} -/** - * The server's response to a prompts/list request from the client. - */ -export interface ListPromptsResult extends Result { - prompts: Prompt[]; -} -/** - * Used by the client to get a prompt provided by the server. - */ -export interface GetPromptRequest extends Request { - method: "prompts/get"; - params: { - /** - * The name of the prompt or prompt template. - */ - name: string; - /** - * Arguments to use for templating the prompt. - */ - arguments?: { - [key: string]: string; - }; - }; -} -/** - * The server's response to a prompts/get request from the client. - */ -export interface GetPromptResult extends Result { - /** - * An optional description for the prompt. - */ - description?: string; - messages: SamplingMessage[]; -} -/** - * A prompt or prompt template that the server offers. - */ -export interface Prompt { - /** - * The name of the prompt or prompt template. - */ - name: string; - /** - * An optional description of what this prompt provides - */ - description?: string; - /** - * A list of arguments to use for templating the prompt. - */ - arguments?: PromptArgument[]; -} -/** - * Describes an argument that a prompt can accept. - */ -export interface PromptArgument { - /** - * The name of the argument. - */ - name: string; - /** - * A human-readable description of the argument. - */ - description?: string; - /** - * Whether this argument must be provided. - */ - required?: boolean; -} -/** - * Sent from the client to request a list of tools the server has. - */ -export interface ListToolsRequest extends Request { - method: "tools/list"; -} -/** - * The server's response to a tools/list request from the client. - */ -export interface ListToolsResult extends Result { - tools: Tool[]; -} -/** - * The server's response to a tool call. - */ -export interface CallToolResult extends Result { - toolResult: unknown; -} -/** - * Used by the client to invoke a tool provided by the server. - */ -export interface CallToolRequest extends Request { - method: "tools/call"; - params: { - name: string; - arguments?: { - [key: string]: unknown; - }; - }; -} -/** - * An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client. - */ -export interface ToolListChangedNotification extends Notification { - method: "notifications/tools/list_changed"; -} -/** - * Definition for a tool the client can call. - */ -export interface Tool { - /** - * The name of the tool. - */ - name: string; - /** - * A human-readable description of the tool. - */ - description?: string; - /** - * A JSON Schema object defining the expected parameters for the tool. - */ - inputSchema: { - type: "object"; - properties?: { - [key: string]: object; - }; - }; -} -/** - * A request from the client to the server, to enable or adjust logging. - */ -export interface SetLevelRequest extends Request { - method: "logging/setLevel"; - params: { - /** - * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message. - */ - level: LoggingLevel; - }; -} -/** - * Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically. - */ -export interface LoggingMessageNotification extends Notification { - method: "notifications/message"; - params: { - /** - * The severity of this log message. - */ - level: LoggingLevel; - /** - * An optional name of the logger issuing this message. - */ - logger?: string; - /** - * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here. - */ - data: unknown; - }; -} -/** - * The severity of a log message. - */ -export type LoggingLevel = "debug" | "info" | "warning" | "error"; -/** - * A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it. - */ -export interface CreateMessageRequest extends Request { - method: "sampling/createMessage"; - params: { - messages: SamplingMessage[]; - /** - * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt. - */ - systemPrompt?: string; - /** - * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request. - */ - includeContext?: "none" | "thisServer" | "allServers"; - /** - * @TJS-type number - */ - temperature?: number; - /** - * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested. - */ - maxTokens: number; - stopSequences?: string[]; - /** - * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific. - */ - metadata?: object; - }; -} -/** - * The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it. - */ -export interface CreateMessageResult extends Result, SamplingMessage { - /** - * The name of the model that generated the message. - */ - model: string; - /** - * The reason why sampling stopped. - */ - stopReason: "endTurn" | "stopSequence" | "maxTokens"; -} -/** - * Describes a message issued to or received from an LLM API. - */ -export interface SamplingMessage { - role: "user" | "assistant"; - content: TextContent | ImageContent; -} -/** - * Text provided to or from an LLM. - */ -export interface TextContent { - type: "text"; - /** - * The text content of the message. - */ - text: string; -} -/** - * An image provided to or from an LLM. - */ -export interface ImageContent { - type: "image"; - /** - * The base64-encoded image data. - * - * @format byte - */ - data: string; - /** - * The MIME type of the image. Different providers may support different image types. - */ - mimeType: string; -} -/** - * A request from the client to the server, to ask for completion options. - */ -export interface CompleteRequest extends Request { - method: "completion/complete"; - params: { - ref: PromptReference | ResourceReference; - /** - * The argument's information - */ - argument: { - /** - * The name of the argument - */ - name: string; - /** - * The value of the argument to use for completion matching. - */ - value: string; - }; - }; -} -/** - * The server's response to a completion/complete request - */ -export interface CompleteResult extends Result { - completion: { - /** - * An array of completion values. Must not exceed 100 items. - */ - values: string[]; - /** - * The total number of completion options available. This can exceed the number of values actually sent in the response. - */ - total?: number; - /** - * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown. - */ - hasMore?: boolean; - }; -} -/** - * A reference to a resource or resource template definition. - */ -export interface ResourceReference { - type: "ref/resource"; - /** - * The URI or URI template of the resource. - * - * @format uri-template - */ - uri: string; -} -/** - * Identifies a prompt. - */ -export interface PromptReference { - type: "ref/prompt"; - /** - * The name of the prompt or prompt template - */ - name: string; -} -export type ClientRequest = PingRequest | InitializeRequest | CompleteRequest | SetLevelRequest | GetPromptRequest | ListPromptsRequest | ListResourcesRequest | ReadResourceRequest | SubscribeRequest | UnsubscribeRequest | CallToolRequest | ListToolsRequest; -export type ClientNotification = ProgressNotification | InitializedNotification; -export type ClientResult = EmptyResult | CreateMessageResult; -export type ServerRequest = PingRequest | CreateMessageRequest; -export type ServerNotification = ProgressNotification | LoggingMessageNotification | ResourceUpdatedNotification | ResourceListChangedNotification | ToolListChangedNotification; -export type ServerResult = EmptyResult | InitializeResult | CompleteResult | GetPromptResult | ListPromptsResult | ListResourcesResult | ReadResourceResult | CallToolResult | ListToolsResult; -//# sourceMappingURL=schema.d.ts.map \ No newline at end of file diff --git a/dist/types/schema.d.ts.map b/dist/types/schema.d.ts.map deleted file mode 100644 index 849823ae..00000000 --- a/dist/types/schema.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,cAAc,GACtB,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,YAAY,CAAC;AAEjB,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE;YACN;;eAEG;YACH,aAAa,CAAC,EAAE,aAAa,CAAC;SAC/B,CAAC;QACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,KAAK,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AA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mBAAmB,CAAC;AAG7D,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,oBAAoB,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAC1B,oBAAoB,GACpB,0BAA0B,GAC1B,2BAA2B,GAC3B,+BAA+B,GAC/B,2BAA2B,CAAC;AAEhC,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"} \ No newline at end of file diff --git a/dist/types/schema.js b/dist/types/schema.js deleted file mode 100644 index a51e9bb3..00000000 --- a/dist/types/schema.js +++ /dev/null @@ -1,10 +0,0 @@ -export const JSONRPC_VERSION = "2.0"; -// Standard JSON-RPC error codes -export const PARSE_ERROR = -32700; -export const INVALID_REQUEST = -32600; -export const METHOD_NOT_FOUND = -32601; -export const INVALID_PARAMS = -32602; -export const INTERNAL_ERROR = -32603; -/* Initialization */ -export const PROTOCOL_VERSION = 1; -//# sourceMappingURL=schema.js.map \ No newline at end of file diff --git a/dist/types/schema.js.map b/dist/types/schema.js.map deleted file mode 100644 index a29ca317..00000000 --- a/dist/types/schema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AAoErC,gCAAgC;AAChC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,CAAC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC;AACvC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAK,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAK,CAAC;AA8BrC,oBAAoB;AACpB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC"} \ No newline at end of file