Token Counter & Context-Window Fit Calculator
token_counter_calculatorToken Counter & Context-Window Fit Calculator — Estimate the token count of any text with the chars/4 words/0.75 heuristic, check if it fits 8k, 128k, 200k, or 1M context windows, and gauge API cost.
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": {
"chars": "<chars>",
"words": "<words>",
"pricePerMillion": "<pricePerMillion>"
},
"name": "token_counter_calculator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chars | Yes | ||
| words | Yes | ||
| pricePerMillion | Yes |