Token Counter
Estimate token usage and cost per model: character comparison, locally saved unit prices and context window usage.
What can this tool do?
Estimate token usage and cost per model: character comparison, locally saved unit prices and context window usage.
Before you begin
Install through the in-app tool market. Plugins update independently; review their permissions before installing.
Usage and limits
A standalone usage guide is not available yet. Check the input hints and help in the app.
Need installation help?
Know what a tool can access.
These capabilities come from the tool manifest. Host authorization and the current operation still determine actual access.
Command line & AI agents
Only the functions explicitly listed below are exposed to their declared channels. Availability also depends on the app version, tool settings and user authorization.
count · Estimate token count, window usage and cost per model (heuristic approximation)
CLI / AI Agent · Read-only
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to measure |
model | string | Model id (unknown ids use the generic factor) |
inputPrice | number | Input price per million tokens |
outputPrice | number | Output price per million tokens |
expectedOutput | integer | Expected output tokens |
tfp-token-counter count '你好世界' --model gpt-4ocat notes.txt | tfp-token-counter count --model claude-sonnet --inputPrice 3 --outputPrice 15Version history
- v0.1.0Current
- Newtoken and cost estimation per model9551b12
Change notes keep the original commit wording.