Skip to main content
Glama

calculators

Token Counter & Context-Window Fit Calculator

token_counter_calculator

Token Counter & Context-Window Fit Calculator — Estimate the token count of any text with the chars/4 words/0.75 heuristic, check if it fits 8k, 128k, 200k, or 1M context windows, and gauge API cost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
charsYes
wordsYes
pricePerMillionYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the heuristic (chars/4, words/0.75) and the supported context windows, which is helpful. However, it does not explain how pricePerMillion is applied or what the output format looks like, nor does it note that estimates are approximate. This is adequate but not richly transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the main purpose and includes the key heuristic and context sizes. Every part adds value without repetition or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 3-parameter calculator with no output schema, the description covers the core functionality: token estimation, context fit, and cost. It does not explicitly state return values or limitations, but the intended behavior is reasonably clear. Given the tool's simplicity, the description is near-complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explains the role of 'chars' and 'words' via the heuristic and mentions 'pricePerMillion' in relation to cost, but it does not provide precise parameter definitions or the exact cost formula. The description adds some meaning but leaves gaps for pricePerMillion and output details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Estimate the token count of any text with the chars/4 words/0.75 heuristic, check if it fits 8k, 128k, 200k, or 1M context windows, and gauge API cost.' It uses a specific verb ('Estimate') and names concrete resources (token count, context windows, API cost). It also distinguishes from siblings by specifying the heuristic and context sizes, which is unique among the calculator tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use cases (estimating tokens, checking context fit, gauging cost) but does not explicitly mention when to use this tool versus alternatives like llm_api_cost_calculator or fine_tuning_cost_calculator. There is no exclusionary guidance or naming of alternative tools, so usage context is only implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

B3.1/5.0
Disambiguation2/5

Many calculators occupy overlapping conceptual spaces, such as 'ai_roi_calculator' vs 'ai_automation_payback_calculator' and 'llm_self_host_vs_api_calculator' vs 'ai_build_vs_buy_calculator'. The boundaries between debt payoff, savings goal, and drawdown tools are also fuzzy, making it easy for an agent to select the wrong tool despite detailed descriptions.

Naming Consistency5/5

Every tool follows the same <topic>_calculator pattern with lowercase snake_case, making the naming highly predictable and consistent. Even acronyms and numbers fit the pattern, so there is no mixing of conventions.

Tool Count1/5

122 tools is an extreme number for a single MCP server, far exceeding the 50+ threshold for a severe mismatch. The tools span unrelated domains like AI costs, pet food, concrete, pizza dough, and turkey cooking, creating an unfocused kitchen-sink surface that overwhelms an agent's selection process.

Completeness3/5

The set covers many common calculator categories such as finance, construction, health, and AI costs, but several staple calculators are missing (e.g., BMI, tip, discount, simple interest, currency conversion). The AI cost cluster is over-saturated while other everyday calculations are absent, leaving minor but noticeable gaps.

Resources