-
-
Notifications
You must be signed in to change notification settings - Fork 4k
bug: mcp image handling bug https://github.com/gitroomhq/postiz-app/issues/856 #968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Conversation
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
@FinestMaximus is attempting to deploy a commit to the Listinai Team on Vercel.
A member of the Team first needs to authorize it.
JohnnyTradingDev
commented
Oct 4, 2025
Thank you for working on this! I'm experiencing a similar but different error (object found, string expected) when posting images to X via the UI. Hoping this fix gets merged soon!
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.
Uh oh!
There was an error while loading. Please reload this page.
What kind of change does this PR introduce?
Bug fix - Fixes MCP tool ignoring the
imagesarray parameter when scheduling posts.Why was this change needed?
This change fixes issue #856 where the
POSTIZ_SCHEDULE_POSTMCP tool was completely ignoring theimagesarray parameter, causing posts to be created without any provided images.Root Causes Fixed:
Type Inconsistency: The zod schema defined
type: eenum(['draft', 'scheduled'])but the TypeScript interface used'draft' | 'schedule', and the actual API expects'schedule'not'scheduled'.Missing Images Interface: The TypeScript interface only defined
posts: { text: string }[]but the zod schema expectedimages: array(string())as well.Images Array Completely Ignored: The implementation only handled AI-generated images when
generatePictures=true, but never used any images provided in theimagesarray parameter.Changes Made:
'scheduled'to'schedule'in zod schemaimages: string[]to the TypeScript interfaceimagesarray if availablegeneratePictures=trueand no images providedThis ensures that when users call the MCP tool with images, those images are actually included in the post instead of being silently ignored.
Other information:
This is a straightforward bug fix that doesn't change the API surface - it just makes the existing
imagesparameter work as documented. No breaking changes, and maintains backward compatibility with existing usage patterns.The fix ensures that the MCP tool now works correctly for users who want to include specific images in their social media posts, which is a core functionality that was previously broken.
Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;