count_tokens
Count whitespace-delimited tokens, total characters, and Arabic characters in a given text for quick text statistics.
Instructions
Count basic statistics: whitespace tokens, characters, Arabic characters.
"Tokens" means whitespace-delimited words (not an LLM subword tokenizer).
Args: text: The text to measure.
Returns: A dict with token, character, no-space character, and Arabic-character counts.
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_tokens"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |