upload_media
Upload a jpg/png/webp/gif/mp4/mov to X/Twitter and get a media ID for posting; chunked transfer and video processing polling prevent timeouts on large files.
Instructions
Upload an image, GIF or video and get the media id for post_tweet.
Cookie auth, no API keys. Chunked (4 MiB) with processing polling for video, so large files take a while but do not time out. jpg/png/webp/gif/mp4/mov.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |