From fd0ad34e874ef2ef4f26292f68436e7f3443f3a4 Mon Sep 17 00:00:00 2001 From: Scott McCarty Date: Tue, 24 Feb 2026 22:30:36 -0500 Subject: [PATCH] fix: wrap MCP schedule post error returns in output key The integrationSchedulePostTool outputSchema expects all returns wrapped in { output: ... }, but both error paths (DTO validation and character length) returned { errors: ... } directly. This caused Mastra/MCP schema validation to reject error responses, making scheduling failures silent. Co-Authored-By: Claude Opus 4.6 --- .../src/chat/tools/integration.schedule.post.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/nestjs-libraries/src/chat/tools/integration.schedule.post.ts b/libraries/nestjs-libraries/src/chat/tools/integration.schedule.post.ts index 078bea72f0..9bd0828557 100644 --- a/libraries/nestjs-libraries/src/chat/tools/integration.schedule.post.ts +++ b/libraries/nestjs-libraries/src/chat/tools/integration.schedule.post.ts @@ -152,7 +152,7 @@ If the tools return errors, you would need to rerun it with the right parameters const errors = await validate(obj); if (errors.length) { return { - errors: JSON.stringify(errors), + output: { errors: JSON.stringify(errors) }, }; } @@ -174,7 +174,7 @@ If the tools return errors, you would need to rerun it with the right parameters if (errorsLength.length) { return { - errors: JSON.stringify(errorsLength), + output: { errors: JSON.stringify(errorsLength) }, }; } }