@settlemint/sdk-mcp 2.2.1 → 2.2.2-main9c76b6df

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mcp.js CHANGED
@@ -52956,18 +52956,20 @@ var z = /* @__PURE__ */ Object.freeze({
52956
52956
  });
52957
52957
 
52958
52958
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
52959
- var LATEST_PROTOCOL_VERSION = "2024-11-05";
52959
+ var LATEST_PROTOCOL_VERSION = "2025-03-26";
52960
52960
  var SUPPORTED_PROTOCOL_VERSIONS = [
52961
52961
  LATEST_PROTOCOL_VERSION,
52962
+ "2024-11-05",
52962
52963
  "2024-10-07"
52963
52964
  ];
52964
52965
  var JSONRPC_VERSION = "2.0";
52965
52966
  var ProgressTokenSchema = z.union([z.string(), z.number().int()]);
52966
52967
  var CursorSchema = z.string();
52968
+ var RequestMetaSchema = z.object({
52969
+ progressToken: z.optional(ProgressTokenSchema)
52970
+ }).passthrough();
52967
52971
  var BaseRequestParamsSchema = z.object({
52968
- _meta: z.optional(z.object({
52969
- progressToken: z.optional(ProgressTokenSchema)
52970
- }).passthrough())
52972
+ _meta: z.optional(RequestMetaSchema)
52971
52973
  }).passthrough();
52972
52974
  var RequestSchema = z.object({
52973
52975
  method: z.string(),
@@ -53218,13 +53220,21 @@ var GetPromptResultSchema = ResultSchema.extend({
53218
53220
  var PromptListChangedNotificationSchema = NotificationSchema.extend({
53219
53221
  method: z.literal("notifications/prompts/list_changed")
53220
53222
  });
53223
+ var ToolAnnotationsSchema = z.object({
53224
+ title: z.optional(z.string()),
53225
+ readOnlyHint: z.optional(z.boolean()),
53226
+ destructiveHint: z.optional(z.boolean()),
53227
+ idempotentHint: z.optional(z.boolean()),
53228
+ openWorldHint: z.optional(z.boolean())
53229
+ }).passthrough();
53221
53230
  var ToolSchema = z.object({
53222
53231
  name: z.string(),
53223
53232
  description: z.optional(z.string()),
53224
53233
  inputSchema: z.object({
53225
53234
  type: z.literal("object"),
53226
53235
  properties: z.optional(z.object({}).passthrough())
53227
- }).passthrough()
53236
+ }).passthrough(),
53237
+ annotations: z.optional(ToolAnnotationsSchema)
53228
53238
  }).passthrough();
53229
53239
  var ListToolsRequestSchema = PaginatedRequestSchema.extend({
53230
53240
  method: z.literal("tools/list")
@@ -53507,7 +53517,7 @@ class Protocol {
53507
53517
  Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
53508
53518
  }
53509
53519
  _onrequest(request, extra) {
53510
- var _a, _b, _c;
53520
+ var _a, _b, _c, _d;
53511
53521
  const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== undefined ? _a : this.fallbackRequestHandler;
53512
53522
  if (handler === undefined) {
53513
53523
  (_b = this._transport) === null || _b === undefined || _b.send({
@@ -53525,9 +53535,11 @@ class Protocol {
53525
53535
  const fullExtra = {
53526
53536
  signal: abortController.signal,
53527
53537
  sessionId: (_c = this._transport) === null || _c === undefined ? undefined : _c.sessionId,
53538
+ _meta: (_d = request.params) === null || _d === undefined ? undefined : _d._meta,
53528
53539
  sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
53529
53540
  sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
53530
- authInfo: extra === null || extra === undefined ? undefined : extra.authInfo
53541
+ authInfo: extra === null || extra === undefined ? undefined : extra.authInfo,
53542
+ requestId: request.id
53531
53543
  };
53532
53544
  Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
53533
53545
  var _a2;
@@ -55157,7 +55169,8 @@ class McpServer {
55157
55169
  description: tool.description,
55158
55170
  inputSchema: tool.inputSchema ? zodToJsonSchema(tool.inputSchema, {
55159
55171
  strictUnions: true
55160
- }) : EMPTY_OBJECT_JSON_SCHEMA
55172
+ }) : EMPTY_OBJECT_JSON_SCHEMA,
55173
+ annotations: tool.annotations
55161
55174
  };
55162
55175
  })
55163
55176
  }));
@@ -55442,18 +55455,33 @@ class McpServer {
55442
55455
  if (this._registeredTools[name]) {
55443
55456
  throw new Error(`Tool ${name} is already registered`);
55444
55457
  }
55458
+ const isZodRawShape = (obj) => {
55459
+ if (typeof obj !== "object" || obj === null)
55460
+ return false;
55461
+ return Object.values(obj).some((v) => v instanceof ZodType);
55462
+ };
55445
55463
  let description;
55446
55464
  if (typeof rest[0] === "string") {
55447
55465
  description = rest.shift();
55448
55466
  }
55449
55467
  let paramsSchema;
55468
+ let annotations;
55450
55469
  if (rest.length > 1) {
55451
- paramsSchema = rest.shift();
55470
+ const firstArg = rest[0];
55471
+ if (isZodRawShape(firstArg)) {
55472
+ paramsSchema = rest.shift();
55473
+ if (rest.length > 1 && typeof rest[0] === "object" && rest[0] !== null && !isZodRawShape(rest[0])) {
55474
+ annotations = rest.shift();
55475
+ }
55476
+ } else if (typeof firstArg === "object" && firstArg !== null) {
55477
+ annotations = rest.shift();
55478
+ }
55452
55479
  }
55453
55480
  const cb = rest[0];
55454
55481
  const registeredTool = {
55455
55482
  description,
55456
55483
  inputSchema: paramsSchema === undefined ? undefined : z.object(paramsSchema),
55484
+ annotations,
55457
55485
  callback: cb,
55458
55486
  enabled: true,
55459
55487
  disable: () => registeredTool.update({ enabled: false }),
@@ -55471,6 +55499,8 @@ class McpServer {
55471
55499
  registeredTool.inputSchema = z.object(updates.paramsSchema);
55472
55500
  if (typeof updates.callback !== "undefined")
55473
55501
  registeredTool.callback = updates.callback;
55502
+ if (typeof updates.annotations !== "undefined")
55503
+ registeredTool.annotations = updates.annotations;
55474
55504
  if (typeof updates.enabled !== "undefined")
55475
55505
  registeredTool.enabled = updates.enabled;
55476
55506
  this.sendToolListChanged();
@@ -61234,7 +61264,7 @@ var {
61234
61264
  var package_default = {
61235
61265
  name: "@settlemint/sdk-mcp",
61236
61266
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
61237
- version: "2.2.1",
61267
+ version: "2.2.2-main9c76b6df",
61238
61268
  type: "module",
61239
61269
  private: false,
61240
61270
  license: "FSL-1.1-MIT",
@@ -61275,9 +61305,9 @@ var package_default = {
61275
61305
  dependencies: {
61276
61306
  "@graphql-tools/load": "8.1.0",
61277
61307
  "@graphql-tools/url-loader": "8.0.31",
61278
- "@modelcontextprotocol/sdk": "1.10.2",
61279
- "@settlemint/sdk-js": "2.2.1",
61280
- "@settlemint/sdk-utils": "2.2.1",
61308
+ "@modelcontextprotocol/sdk": "1.11.0",
61309
+ "@settlemint/sdk-js": "2.2.2-main9c76b6df",
61310
+ "@settlemint/sdk-utils": "2.2.2-main9c76b6df",
61281
61311
  "@commander-js/extra-typings": "11.1.0",
61282
61312
  commander: "11.1.0",
61283
61313
  zod: "3.24.3"
@@ -67025,4 +67055,4 @@ await main().catch((error2) => {
67025
67055
  process.exit(1);
67026
67056
  });
67027
67057
 
67028
- //# debugId=C3C33B27539525B264756E2164756E21
67058
+ //# debugId=3B0E6FC54CEE893764756E2164756E21