Skip to content

Media upload tools fail with "Output validation error: 'meta' is a required property" #5

@grad-256

Description

@grad-256

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

  1. Call the mediaUpload tool with a valid base64-encoded JPEG image:
    {
      "media": "<base64-encoded image>",
      "media_type": "image/jpeg",
      "media_category": "tweet_image"
    }
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions