X(旧 Twitter)の投稿の文字数(日本語は140字)
x_post_weighted_lengthCount the length of a post on X (formerly Twitter) exactly as X does, using X's official twitter-text library: weighted characters where CJK (Japanese, Chinese, Korean) and emoji count 2, most Latin characters count 1, every URL counts 23, text is NFC-normalized, and the limit is 280 (about 140 Japanese characters). It is meant for checking X posts, especially Japanese ones, against the limit. is_valid is also false for an empty text or text with characters X does not accept. Counts only the text given (auto-added reply @mentions and attached media are not counted by X). Long posts for paid accounts are not covered; the text may be at most 1,000 UTF-16 code units, also after NFC normalization. The text is not stored or returned.
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": "x_post_weighted_length"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | 数える本文(UTF-16 で 1,000 まで。NFC にした後も 1,000 まで) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | この答えに効いた決まり・前提(日本語) | |
| result | Yes | ||
| doc_url | Yes | 人が読む説明のページ(式・出所・例)。利用者に次に読んでもらう先 | |
| sources | Yes | ||
| law_as_of | No | 出所が書く法令の基準日(例:2026-04-01=令和8年4月1日現在法令等) | |
| checked_on | Yes | Cyclix Agents が出所を最後に確かめた日 | |
| disclaimer | Yes |