ai_token_count
Token counter and context-fit check — Estimate how many LLM tokens a text uses (GPT-4o / Claude / Llama 3 class BPE tokenizers) with a +/-15% range, plus characters, words, chars-per-token, which context windows it fits (4k to 1M), how many chunks it splits into, and an optional budget check. Query: text (required, up to 100,000 chars); optional budget= token limit to check against; optional chunk= chunk size in tokens (default 1000). Offline and instant, no model call. Price: $0.001 USDC (Base, via x402).
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": "ai_token_count"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The quick brown fox jumps over the lazy dog. |