@ai-sdk/mcp 1.0.34 → 1.0.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/mcp",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -584,6 +584,10 @@ class DefaultMCPClient implements MCPClient {
584
584
  options?.abortSignal?.throwIfAborted();
585
585
  const result = await self.callTool({ name, args, options });
586
586
 
587
+ if (result.isError) {
588
+ return result;
589
+ }
590
+
587
591
  if (outputSchema != null) {
588
592
  return self.extractStructuredContent(result, outputSchema, name);
589
593
  }