Unified token calculator for Claude Chat, Cowork, and Claude Code
Token Calculator Suite has well-structured schemas and clear parameter types, but suffers from critical naming and description gaps. Tool names lack action verbs (calculateTokens, calculateFixedData, formatTokenResult are noun-heavy or ambiguous). Descriptions exist but are generic and lack WHEN/WHY guidance. No error handling documentation. Parameters are typed but descriptions are minimal. Output schemas are documented in TypeScript interfaces but not exposed in tool registration. The suite reads as a utility library, not an agent-optimized tool collection.
Calculate token count from conversation input using language-specific tokenization ratios
Calculate token count for a single file based on type and size parameters
Calculate token count from fixed data including preferences, user memories, system prompt, and overhead
Calculate token count from conversation input and optional files with error margins and context usage breakdown
Convert character count to token count using language-specific ratio
Format token calculation result as human-readable string with breakdown and context usage
Convert word count to token count using language-specific ratio
Tool names lack action verbs. 'calculateTokens', 'calculateFixedData', 'formatTokenResult' are noun-heavy and do not clearly signal intent. LLMs struggle to distinguish between similar names like 'calculateConversationTokens' vs 'calculateFileTokens' without reading full descriptions.
Descriptions are generic and lack WHEN/WHY context. 'Calculate token count from conversation input...' does not explain when to use this vs calculateConversationTokens or calculateFileTokens. No guidance on prerequisites or dependencies.
No error handling documentation. Code throws Error('...must be a non-negative finite number...') but tool descriptions do not explain what errors are possible, whether they are retryable, or what the LLM should do next.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 39 | 2026-07-28+ | v2 |
Parameter descriptions are minimal. 'Number of messages in conversation' does not explain the valid range, whether 0 is allowed, or what happens if negative. 'Language for tokenization ratio' does not explain why only es/en are supported or what happens if an unsupported language is passed.
Output schemas are defined in TypeScript interfaces but not exposed in tool registration. LLMs cannot see what fields calculateTokens returns (totalTokens, minEstimate, maxEstimate, breakdown, contextUsage, confidence) without reading source code.