@mastra/mcp 2.0.0-alpha.5 → 2.1.0-alpha.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.cjs CHANGED
@@ -11196,7 +11196,7 @@ function toStandardSchema$5(schema) {
11196
11196
  return new AiSdkSchemaWrapper(schema);
11197
11197
  }
11198
11198
  //#endregion
11199
- //#region ../schema-compat/dist/json-schema-DaHLYDhg.js
11199
+ //#region ../schema-compat/dist/json-schema-R8yfooPa.js
11200
11200
  var require_code$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
11201
11201
  Object.defineProperty(exports, "__esModule", { value: true });
11202
11202
  exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
@@ -14894,13 +14894,12 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
14894
14894
  if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
14895
14895
  const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
14896
14896
  if (!malformedIPLiteral) malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
14897
+ if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
14898
+ let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
14899
+ if (!isIP) host = normalizePercentEncoding(host.toLowerCase());
14900
+ parsed.host = reescapeHostDelimiters(host, isIP);
14901
+ }
14897
14902
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
14898
- if (uri.indexOf("%") !== -1) {
14899
- if (parsed.host !== void 0 && !malformedIPLiteral) {
14900
- const host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
14901
- parsed.host = reescapeHostDelimiters(host, isIP);
14902
- }
14903
- }
14904
14903
  if (parsed.path) parsed.path = normalizePathEncoding(parsed.path);
14905
14904
  if (parsed.query) parsed.query = normalizeQueryFragmentEncoding(parsed.query);
14906
14905
  if (parsed.fragment) parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
@@ -18240,7 +18239,7 @@ function toStandardSchema$3(zodSchema) {
18240
18239
  return wrapper;
18241
18240
  }
18242
18241
  //#endregion
18243
- //#region ../schema-compat/dist/schema-BwlBcZRB.js
18242
+ //#region ../schema-compat/dist/schema-e0VHpMt0.js
18244
18243
  /**
18245
18244
  * Supported JSON Schema targets for z.toJSONSchema().
18246
18245
  * Works with both real Zod v4 and Zod 3.25's v4 compat layer.
@@ -23836,6 +23835,7 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
23836
23835
  const rawMeta = tool._meta;
23837
23836
  return {
23838
23837
  name: tool.name,
23838
+ ...tool.title ? { title: tool.title } : {},
23839
23839
  ...tool.description ? { description: tool.description } : {},
23840
23840
  inputSchema: tool.inputSchema,
23841
23841
  ...tool.outputSchema ? { outputSchema: tool.outputSchema } : {},
@@ -23855,6 +23855,7 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
23855
23855
  toolFromDefinition({ definition }) {
23856
23856
  const tool = {
23857
23857
  name: definition.name,
23858
+ title: definition.title,
23858
23859
  description: definition.description,
23859
23860
  inputSchema: definition.inputSchema,
23860
23861
  outputSchema: definition.outputSchema,
@@ -23900,6 +23901,7 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
23900
23901
  let requireApproval;
23901
23902
  let needsApprovalFn;
23902
23903
  const annotations = tool.annotations;
23904
+ const title = tool.title || annotations?.title;
23903
23905
  if (typeof this.requireToolApproval === "function") {
23904
23906
  const serverApprovalFn = this.requireToolApproval;
23905
23907
  const toolName = tool.name;
@@ -23948,6 +23950,7 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
23948
23950
  };
23949
23951
  const mastraTool = (0, _mastra_core_tools.createTool)({
23950
23952
  id: `${this.name}_${tool.name}`,
23953
+ title,
23951
23954
  description: tool.description || "",
23952
23955
  inputSchema: this.convertInputSchema(tool.inputSchema),
23953
23956
  outputSchema: this.convertOutputSchema(tool.outputSchema),
@@ -26391,6 +26394,7 @@ var MCPServer = class extends _mastra_core_mcp.MCPServerBase {
26391
26394
  const info = this.toolInfo(name, tool);
26392
26395
  const validation = _modelcontextprotocol_server.specTypeSchemas.Tool["~standard"].validate({
26393
26396
  name,
26397
+ title: tool.title,
26394
26398
  description: info.description,
26395
26399
  inputSchema: info.inputSchema,
26396
26400
  outputSchema: info.outputSchema,