docs

MCP tool

upload_media

Attach a picture, video or PDF

Creates or changes something · and, like everything an agent creates, it is mailed to the project — and in copilot mode waits for a human in the approval queue.

What it does

Attach an image, video or PDF and get a media_id for create_post. Sources: file (an attachment from this conversation, as the host provides it), a public https url, base64 data with mime_type. Instagram, TikTok, YouTube and Pinterest need media; a PDF becomes a LinkedIn document post. When an attached file cannot be provided from here, create the post with media_pending: true instead and the person adds it in the approval card. Formats and caps: https://xpost.to/docs/api#media.

Arguments

NameTypeRequiredWhat it is
fileobjectNoA file the user attached to this conversation, as the host hands it over. Absent when the host has no such object.
urlstringNoPublic https URL
datastringNoThe bytes of a small image, video or PDF generated here, base64-encoded, with mime_type. A file the user attached travels as file, or through the post's upload_url, not here.
mime_typestringNoMIME type for data, e.g. image/png, video/mp4
thumbnail_timestamp_msnumberNoVideos: cover-frame time in ms into the video
alt_textstringNoImages: accessibility alt text (max 1000 chars). Applied natively on X and Bluesky

Calling it

Any MCP client calls this by name once the connector is added. The address is the same for every tool:

https://xpost.to/api/mcp

A client that has signed in sends the tool name and its arguments:

{
  "name": "upload_media",
  "arguments": {
    "file": "…",
    "url": "…"
  }
}

The other tools

Back to the MCP connector · What the MCP server is · Connect your assistant