@mastra/mcp 1.5.2 → 1.6.0

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/index.js CHANGED
@@ -492,7 +492,8 @@ var InternalMastraMCPClient = class extends MastraBase {
492
492
  version
493
493
  },
494
494
  {
495
- capabilities: clientCapabilities
495
+ capabilities: clientCapabilities,
496
+ ...server.jsonSchemaValidator ? { jsonSchemaValidator: server.jsonSchemaValidator } : {}
496
497
  }
497
498
  );
498
499
  this.setupLogging();
@@ -2486,6 +2487,7 @@ var MCPServer = class extends MCPServerBase {
2486
2487
  resourceOptions;
2487
2488
  definedPrompts;
2488
2489
  promptOptions;
2490
+ jsonSchemaValidator;
2489
2491
  subscriptions = /* @__PURE__ */ new Set();
2490
2492
  currentLoggingLevel;
2491
2493
  /**
@@ -2622,6 +2624,7 @@ var MCPServer = class extends MCPServerBase {
2622
2624
  super(opts);
2623
2625
  this.resourceOptions = opts.resources;
2624
2626
  this.promptOptions = opts.prompts;
2627
+ this.jsonSchemaValidator = opts.jsonSchemaValidator;
2625
2628
  const capabilities = {
2626
2629
  tools: {},
2627
2630
  logging: { enabled: true }
@@ -2639,7 +2642,8 @@ var MCPServer = class extends MCPServerBase {
2639
2642
  },
2640
2643
  {
2641
2644
  capabilities,
2642
- ...this.instructions ? { instructions: this.instructions } : {}
2645
+ ...this.instructions ? { instructions: this.instructions } : {},
2646
+ ...this.jsonSchemaValidator ? { jsonSchemaValidator: this.jsonSchemaValidator } : {}
2643
2647
  }
2644
2648
  );
2645
2649
  this.logger.info("Initialized MCPServer", {
@@ -2748,7 +2752,8 @@ var MCPServer = class extends MCPServerBase {
2748
2752
  },
2749
2753
  {
2750
2754
  capabilities,
2751
- ...this.instructions ? { instructions: this.instructions } : {}
2755
+ ...this.instructions ? { instructions: this.instructions } : {},
2756
+ ...this.jsonSchemaValidator ? { jsonSchemaValidator: this.jsonSchemaValidator } : {}
2752
2757
  }
2753
2758
  );
2754
2759
  this.registerHandlersOnServer(serverInstance);