Skip to content

fix: wrap MCP schedule post error returns in output key#1242

Closed
fatherlinux wants to merge 1 commit into
gitroomhq:mainfrom
fatherlinux:fix/schedule-post-error-schema
Closed

fix: wrap MCP schedule post error returns in output key#1242
fatherlinux wants to merge 1 commit into
gitroomhq:mainfrom
fatherlinux:fix/schedule-post-error-schema

Conversation

@fatherlinux
Copy link
Copy Markdown

Summary

The integrationSchedulePostTool has an outputSchema that expects all returns wrapped in { output: ... }, but both error paths (DTO validation and character length validation) return { errors: ... } directly. This causes Mastra/MCP schema validation to reject error responses, making scheduling failures silent — the MCP client gets no useful error message.

2-line fix: wrap both error returns in the output key to match the declared schema.

Reproduction

  1. Connect to Postiz via MCP (Streamable HTTP transport)
  2. Call integrationSchedulePostTool with content that exceeds a platform's character limit
  3. Expected: { output: { errors: "..." } }
  4. Actual (before fix): { errors: "..." } — rejected by schema validation

Test plan

  • Schedule a post with content exceeding platform character limit — error message should be returned to MCP client
  • Schedule a post with invalid DTO settings — error message should be returned to MCP client
  • Schedule a valid post — should succeed as before

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 25, 2026

@fatherlinux is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale label May 26, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions Bot closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant