fix(mastra): omit outputSchema to avoid invalid output validation#3070
Open
fix(mastra): omit outputSchema to avoid invalid output validation#3070
Conversation
Mastra validates tool output against outputSchema; Composio schemas are often stricter than real APIs (nulls, extra keys), which caused truncated results. outputSchema is optional on createTool—omit it for pass-through. Updates unit tests accordingly. Fixes #3047 Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
The Please review and fix the vulnerabilities. You can try running: pnpm audit --fix --prodAudit output |
- Replace deprecated external with deps.neverBundle in base and core - CLI: deps.neverBundle for node: only; deps.alwaysBundle replaces noExternal - Add --config-loader unrun to package build scripts for config resolution - Align per-package tsdown.config imports with shared base Made-with: Cursor
jkomyno
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Omit
outputSchemawhen wrapping Composio tools with MastracreateTool. Mastra validates executed tool output againstoutputSchema; Composio output JSON Schemas are often stricter than real third-party APIs (e.g.nullfor optional fields,additionalProperties: false), which led to validation failures and truncated or replaced results as described in #3047.outputSchemais optional on Mastra’screateTool; omitting it matches the “quick fix” proposed in the issue for pass-through tools.Changes
@composio/mastra: stop passingoutputSchemainwrapTool(already on branch history).outputSchema.@composio/mastra.Fixes #3047
Made with Cursor