Token Counter
token-counterUse when a user asks how many tokens a given text will consume, or needs to estimate prompt size before pricing a workload. Given text and tokenizer family, returns low/high token range and byte-level measurements.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "Summarize the Q3 board deck into five concise bullet points for the exec team."
},
"name": "token-counter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text content to count tokens for | |
| tokenizer | No | Tokenizer family (default: default) | |
| expected_out_tokens | No | Expected output token budget (optional) |