token_count_exact
InactiveTool of SaSame Research Agent
Deterministic token count estimate for a text string. Uses a word/subword splitting heuristic calibrated to GPT/Claude tokenizers (~3.8 chars/token for English prose, adjusted for code/numbers). Returns estimate + breakdown. No LLM call, no network. For budget planning before sending text to an LLM.
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"description": "Text to estimate token count for"
},
"model_family": {
"enum": [
"claude",
"gpt",
"generic"
],
"type": "string",
"description": "Token family to calibrate for (default: generic). claude/gpt differ slightly on code vs prose."
}
}
}No endpoints wrapped at confidence ≥ 0.70.
Parent server
SaSame Research Agent
https://github.com/shigeki7777/sasame-mcp
2/7 registries