Bug Report: Media upload tools fail with "Output validation error: 'meta' is a required property"
Description
When attempting to upload media using the mediaUpload tool (or
initializeMediaUpload),
the tool fails with the following error:
Output validation error: 'meta' is a required property
This appears to be a response validation issue where the MCP server expects a meta
field
in the X API response, but the field is not present in the actual response returned by
the API.
Steps to Reproduce
- Call the
mediaUpload tool with a valid base64-encoded JPEG image:
{
"media": "<base64-encoded image>",
"media_type": "image/jpeg",
"media_category": "tweet_image"
}
- Observe the error.
Expected Behavior
The tool should return a media_id that can be used in subsequent post creation.
Actual Behavior
Output validation error: 'meta' is a required property
The upload fails entirely and no media_id is returned, making it impossible to attach
images to posts via MCP.
Environment
- xmcp version: 3.2.0 (X API MCP)
- MCP Client: Claude Code (claude-sonnet-4-6)
Impact
Image posting via Claude Code / MCP is completely broken. Text-only posts work fine.
Possible Cause
The output schema for the media upload tools likely requires a meta property that
the X API does not include in its response. The schema validation should either:
- Make meta optional, or
- Strip unknown/missing fields before validation
Bug Report: Media upload tools fail with "Output validation error: 'meta' is a required property"
Description
When attempting to upload media using the
mediaUploadtool (orinitializeMediaUpload),the tool fails with the following error:
Output validation error: 'meta' is a required property
This appears to be a response validation issue where the MCP server expects a
metafield
in the X API response, but the field is not present in the actual response returned by
the API.
Steps to Reproduce
mediaUploadtool with a valid base64-encoded JPEG image:{ "media": "<base64-encoded image>", "media_type": "image/jpeg", "media_category": "tweet_image" }Expected Behavior
The tool should return a media_id that can be used in subsequent post creation.
Actual Behavior
Output validation error: 'meta' is a required property
The upload fails entirely and no media_id is returned, making it impossible to attach
images to posts via MCP.
Environment
Impact
Image posting via Claude Code / MCP is completely broken. Text-only posts work fine.
Possible Cause
The output schema for the media upload tools likely requires a meta property that
the X API does not include in its response. The schema validation should either: