Count characters the way X does
count_x_charactersWeighted length of a post as X counts it (links are 23, most emoji and CJK are 2), whether it fits, and where the timeline cuts it with “Show more”.
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": "count_x_characters"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The post text. | |
| premium | No | Premium accounts can post up to 25,000 characters. |