count_tokens
ActiveTool of IA-QA — 130+ QA & Dev Tools for AI Agents
Estimate the token count of a text string using the cl100k_base approximation (~4 chars/token). Call this BEFORE sending any text to an LLM API to check if it fits within the model context window and to estimate cost. Returns token estimate, character count, and word count.
Parameters schema
{
"type": "object",
"required": [
"input"
],
"properties": {
"input": {
"type": "string",
"description": "Text to count tokens for"
}
}
}No endpoints wrapped at confidence ≥ 0.70.
Parent server
IA-QA — 130+ QA & Dev Tools for AI Agents
https://github.com/jcjamet/ia-qa
1/7 registries