@ai-sdk/mcp 2.0.0-beta.17 → 2.0.0-beta.18

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/mcp
2
2
 
3
+ ## 2.0.0-beta.18
4
+
5
+ ### Patch Changes
6
+
7
+ - e3ea484: fix(mcp): bypass outputSchema validation when tool returns isError
8
+
3
9
  ## 2.0.0-beta.17
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1968,6 +1968,9 @@ var DefaultMCPClient = class {
1968
1968
  var _a4;
1969
1969
  (_a4 = options == null ? void 0 : options.abortSignal) == null ? void 0 : _a4.throwIfAborted();
1970
1970
  const result = await self.callTool({ name: name3, args, options });
1971
+ if (result.isError) {
1972
+ return result;
1973
+ }
1971
1974
  if (outputSchema != null) {
1972
1975
  return self.extractStructuredContent(result, outputSchema, name3);
1973
1976
  }