@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/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -20903,21 +20903,31 @@ var MCPServer = class extends _mastra_core_mcp.MCPServerBase {
|
|
|
20903
20903
|
ui: { resourceUri },
|
|
20904
20904
|
[_modelcontextprotocol_ext_apps.RESOURCE_URI_META_KEY]: resourceUri
|
|
20905
20905
|
} } : {};
|
|
20906
|
-
if (!tool.outputSchema)
|
|
20907
|
-
|
|
20908
|
-
|
|
20909
|
-
|
|
20910
|
-
|
|
20911
|
-
|
|
20912
|
-
|
|
20913
|
-
|
|
20914
|
-
|
|
20906
|
+
if (!tool.outputSchema) {
|
|
20907
|
+
const text = typeof value === "string" ? value : JSON.stringify(value);
|
|
20908
|
+
return {
|
|
20909
|
+
isError: false,
|
|
20910
|
+
content: text === void 0 ? [] : [{
|
|
20911
|
+
type: "text",
|
|
20912
|
+
text
|
|
20913
|
+
}],
|
|
20914
|
+
...meta
|
|
20915
|
+
};
|
|
20916
|
+
}
|
|
20917
|
+
const text = JSON.stringify(value);
|
|
20918
|
+
if (text === void 0) {
|
|
20919
|
+
this.logger.warn(`Tool '${name}' declares an outputSchema but returned no structured output.`);
|
|
20920
|
+
return {
|
|
20921
|
+
...errorResult$1(`Tool '${name}' declares an outputSchema but returned no output.`),
|
|
20922
|
+
...meta
|
|
20923
|
+
};
|
|
20924
|
+
}
|
|
20915
20925
|
return {
|
|
20916
20926
|
isError: false,
|
|
20917
|
-
structuredContent,
|
|
20927
|
+
structuredContent: value,
|
|
20918
20928
|
content: [{
|
|
20919
20929
|
type: "text",
|
|
20920
|
-
text
|
|
20930
|
+
text
|
|
20921
20931
|
}],
|
|
20922
20932
|
...meta
|
|
20923
20933
|
};
|