post_tweet_with_image
Post a tweet with an attached image file from your local filesystem. Supports JPEG, PNG, GIF, WebP, and optional threaded replies.
Instructions
Posts a new tweet with an attached image file to the authenticated Twitter/X account. Use this tool when the LLM needs to publish a status update that includes a photo, graphic, screenshot, or any visual media. The image is uploaded from a local filesystem path (supports JPEG, PNG, GIF, WebP). The accompanying text must be 280 characters or fewer. Optionally accepts a reply_to_tweet_id for threaded replies. Returns the created tweet object with ID, text, author, and timestamp. Falls back to the standard Twitter API v2 media upload endpoint.
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": {
"text": "<text>",
"image_path": "<image_path>"
},
"name": "post_tweet_with_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The main body text of the tweet. Maximum 280 characters. This text accompanies the uploaded image in the tweet post. | |
| image_path | Yes | Absolute or relative filesystem path to the image file to upload and attach to the tweet. Supported formats: JPEG, PNG, GIF, WebP. The file must exist and be readable at the time of invocation. | |
| reply_to_tweet_id | No | The unique numeric ID of an existing tweet to reply to. When provided, the new tweet-with-image will be posted as a threaded reply. Omit for a standalone tweet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Container holding the created tweet details. | |
| status | Yes | Indicates the outcome of the operation: "success" or "error". | |
| message | Yes | A human-readable summary of the result, e.g. "Tweet posted successfully". |