post_tweet_with_image
Post a tweet with an attached image to Twitter. Accepts local image files (JPEG, PNG, GIF, WebP), text up to 280 characters, and optional reply threading.
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.
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 |
|---|---|---|---|
| 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". | |
| data | Yes | Container holding the created tweet details. |