x_publish
Post to the user's connected X account: text alone, or with 1 to 4 project images (imageAssetIds) or one finished export (exportTaskId), only when the user asked to post. Text: the user's words; with none, write a short draft and ask, never a project or file name.
Actions:
prepare: returns a draft; confirm it with the user in your own interface as the widget-forms Skill's X post section says for your host, then end your turn. Nothing is posted until they confirm. In the same reply, state the credits from the result, and say plainly when a link makes X charge far more. An ignored draft stays in memory until submitted, cancelled, replaced or the page reloads; prepare again replaces it, no cancel needed.
publish: only after the user confirmed. Pass approvalId and text, the exact final text they confirmed. Returns the postUrl or a pending state.
publish with direct=true and no approvalId: posts at once, only when the user's own message says to post without confirming ("post it directly", "直接发", "不用确认", "批量发") and gives the complete post (text, and media if any); otherwise prepare. One call per post; after each, tell them the account, text, media, credits and postUrl. A draft you asked them to confirm waits for that confirmation.
status: checks the original approvalId or publicationRequestId with the same accountTarget and reports what X confirms. For a media post, include postId if known to check it against the original upload.
retry: when the user wants to retry, pass the original ID. ChatCut checks the original attempt before starting a linked retry. An unknown result can still produce a duplicate.
cancel: withdraws a draft or stops work that can still be stopped. If X may have accepted it, check its status.
Use prepare for another post at any time. Reply with the confirmed postUrl as a Markdown link. Keep the project's editor tab open. Not connected or expired: manage_connectors action=connect. Insufficient credits: report it, do not retry.
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": {
"action": "<action>"
},
"name": "x_publish"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | The post text. Use the user's words. If they gave none, draft text for this content and ask them; never use the project, timeline or file name. The user can edit it before posting. With publish: omit it in ChatCut's own chat (the submitted form decides); elsewhere pass the exact final text the user confirmed. With direct: the user's complete text. If X rejects the post text, report its reason and get approval for any edits before submitting another post. | |
| action | Yes | prepare, publish, status, retry or cancel. publish only after the user confirmed the draft (in ChatCut's own chat by submitting its form, elsewhere in your own interface), or with direct=true when they explicitly asked to post without confirming. | |
| direct | No | true with action=publish and no approvalId: post now without a draft to confirm, only when the user explicitly asked to post without confirming and gave the complete post. | |
| postId | No | A known numeric X post ID to check against an original media upload. | |
| projectId | No | Project for this call (full ID or unambiguous prefix). Explicit-timeline calls never change the target of later calls; legacy project selection applies otherwise. | |
| approvalId | No | Returned by prepare. Pass it back unchanged for publish, status, retry or cancel of the same draft or post. | |
| timelineId | No | ||
| exportTaskId | No | For a video post: the finished MP4 export (renderId from submit_export on the Web, taskId from export on Desktop). | |
| accountTarget | No | Exact account {accountId, revision} from list_connectors. Required on every platform call. | |
| imageAssetIds | No | 1 to 4 image asset IDs from this project (JPEG, PNG or WebP up to 5 MiB, GIF up to 15 MiB) to attach instead of a video. Omit both this and exportTaskId for a text-only post. | |
| publicationRequestId | No | Returned once the post is submitted. Pass it back unchanged with status, retry or cancel. |