@mastra/mcp 2.6.0-alpha.1 → 2.6.0-alpha.3
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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +21 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20877,21 +20877,31 @@ var MCPServer = class extends MCPServerBase {
|
|
|
20877
20877
|
ui: { resourceUri },
|
|
20878
20878
|
[RESOURCE_URI_META_KEY]: resourceUri
|
|
20879
20879
|
} } : {};
|
|
20880
|
-
if (!tool.outputSchema)
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
20888
|
-
|
|
20880
|
+
if (!tool.outputSchema) {
|
|
20881
|
+
const text = typeof value === "string" ? value : JSON.stringify(value);
|
|
20882
|
+
return {
|
|
20883
|
+
isError: false,
|
|
20884
|
+
content: text === void 0 ? [] : [{
|
|
20885
|
+
type: "text",
|
|
20886
|
+
text
|
|
20887
|
+
}],
|
|
20888
|
+
...meta
|
|
20889
|
+
};
|
|
20890
|
+
}
|
|
20891
|
+
const text = JSON.stringify(value);
|
|
20892
|
+
if (text === void 0) {
|
|
20893
|
+
this.logger.warn(`Tool '${name}' declares an outputSchema but returned no structured output.`);
|
|
20894
|
+
return {
|
|
20895
|
+
...errorResult$1(`Tool '${name}' declares an outputSchema but returned no output.`),
|
|
20896
|
+
...meta
|
|
20897
|
+
};
|
|
20898
|
+
}
|
|
20889
20899
|
return {
|
|
20890
20900
|
isError: false,
|
|
20891
|
-
structuredContent,
|
|
20901
|
+
structuredContent: value,
|
|
20892
20902
|
content: [{
|
|
20893
20903
|
type: "text",
|
|
20894
|
-
text
|
|
20904
|
+
text
|
|
20895
20905
|
}],
|
|
20896
20906
|
...meta
|
|
20897
20907
|
};
|