Token Diet
Server Details
Count tokens exactly for any text and see if it fits a 128K, 200K or 1M context window.
- Status
- Healthy
- Uptime
- 100.0% over the last 24 hours
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
- ChatGPT
- –
- Claude
- –
TDQS
Scored across 1 tool
With only one tool there is zero possibility of misselection; its purpose (measuring token counts and context-window fit) is stated explicitly and its negative boundary (not for shortening text) is called out. No overlap or ambiguity exists.
The single name tokendiet_count_tokens follows a clear namespace + verb_noun convention (count_tokens) and is self-describing. There is no competing convention to clash with.
For a narrowly scoped utility like token measurement, one tool is largely the right size and every part earns its place. It is slightly thin in that there is no batch or multi-text variant, but nothing feels over- or under-built for the stated purpose.
The core operation — exact token/word/character counts plus per-window utilization — fully covers the stated domain. Minor gaps exist (batch counting, explicit cross-tokenizer comparison, file/URL input), but agents can work around these by calling the tool per text.
Available Tools
1 tooltokendiet_count_tokensCount the exact tokens in a textARead-onlyIdempotentInspect
Use when the user asks how many tokens a text, prompt, log, document or code paste is, whether it fits a context window (128K, 200K, 1M), or how big something is before they send it to an AI. Returns the exact o200k token count (GPT-4o family and later; Claude and Gemini usually within about 15%), plus words, characters and how much of each window it uses. Counts are exact for that tokenizer. Example: {"text": ""}. Not for shortening text.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Count tokens (o200k/cl100k), truncate to a budget, chunk text for RAG and estimate LLM cost.
Counts tokens under OpenAI-compatible (tiktoken) encodings, by model or encoding name.
Token counting, RAG chunking, truncation, HTML to Markdown and JSON repair
Exact Claude API cost calc with real cache economics, plus a tiktoken-misuse scanner.
Related MCP Servers
- AlicenseAqualityDmaintenanceEstimates Claude API token counts, per-model cost, and prompt-caching break-even without an API key or network.5MIT
- FlicenseNot gradedqualityCmaintenanceAccurately counts characters, bytes, and manuscript paper based on Unicode grapheme clusters, and provides deterministic feedback to help AI meet exact length limits for self-introductions or school records.-
- AlicenseAqualityDmaintenanceLets Claude Desktop, Cursor, Cline, Windsurf, Zed, or any other MCP client estimate token counts and fit a chat history into a model's context budget on demand.345 npm1MIT
- AlicenseNot gradedqualityDmaintenanceProvides tools to count tokens, estimate API costs, optimize prompts, and compare AI model pricing for multiple LLMs.55 npmMIT
Glama MCP Gateway
Add one secure layer between your agents and this server.