Create X post
create_x_postMakes an X (Twitter) share link. Use when the user wants to post or reply on X. Needs text; url, hashtags, via and in_reply_to are optional. Counts characters the way X does and sets is_within_free_limit to false when the post is over 280 characters (only X Premium can post it, so offer a shorter version). Returns an x.com link that opens the composer with the post filled in, and the user posts it. Nothing is posted or stored.
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>"
},
"name": "create_x_post"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Optional web link to attach, such as "https://example.com". X counts it as 23 characters. | |
| via | No | Optional X username to credit, without the @ sign, such as "openkrill". | |
| text | Yes | Post text (at most 25,000 characters), such as "We shipped our new CLI today!". Standard accounts can post up to 280 characters; X Premium up to 25,000. | |
| hashtags | No | Optional hashtags without the # sign, such as ["devtools", "opensource"]. | |
| in_reply_to | No | Optional numeric ID of the post to reply to, the digits at the end of its URL, such as "1850000000000000000". Not the full URL. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | Short notes to pass on to the user, including any warning. | |
| x_url | Yes | Official X share intent link (x.com/intent/tweet). | |
| status | Yes | Always ok when the link was made. Bad input returns an error instead. | |
| warning | No | Warning if text exceeds free character limit or safe URL limits. | |
| url_length | Yes | Total length of the generated intent URL. | |
| character_count | Yes | Estimated effective character count on X. | |
| is_within_free_limit | Yes | True if within the 280-character free limit. |