Skip to main content
Glama
atriumn
by atriumn

Install in 30 seconds

Claude Code:

claude mcp add tokencost-dev -- npx -y tokencost-dev

Then ask: "How much would 1M input tokens cost on claude-sonnet-4-5?"

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "tokencost-dev": {
      "command": "npx",
      "args": ["-y", "tokencost-dev"]
    }
  }
}

No API keys. No accounts. No configuration files. Pricing data is fetched from the LiteLLM community registry and cached locally for 24 hours.

Related MCP server: UsageWall

Tools

get_model_details

Look up pricing, context window, and capabilities for any model. Fuzzy matching means "sonnet 4.5" works just as well as "claude-sonnet-4-5-20250514".

> "What are Claude Sonnet 4.5's pricing and capabilities?"

Model: claude-sonnet-4-5
Provider: anthropic | Mode: chat

Pricing (per 1M tokens):
  Input:  $3.00
  Output: $15.00

Context Window:
  Max Input:  200K
  Max Output: 8K

Capabilities: vision, function_calling, parallel_function_calling

calculate_estimate

Estimate cost for a given number of input and output tokens.

> "How much will 1000 input + 500 output tokens cost on Claude Sonnet 4.5?"

Cost Estimate for claude-sonnet-4-5

  Input:  1K tokens × $3.00/1M  = $0.003000
  Output: 500 tokens × $15.00/1M = $0.007500
  ─────────────────────────────
  Total:  $0.0105

compare_models

Find the most cost-effective models matching your requirements.

> "What are the cheapest OpenAI chat models?"

Top 2 most cost-effective models (provider: openai) (mode: chat):

1. gpt-4o-mini
   Provider: openai | Mode: chat
   Input: $0.15/1M | Output: $0.60/1M
   Context: 128K in / 16K out

2. gpt-4o
   Provider: openai | Mode: chat
   Input: $5.00/1M | Output: $15.00/1M
   Context: 128K in / 16K out

refresh_prices

Force re-fetch pricing data from the LiteLLM registry (cache is refreshed automatically every 24h).

Docs

Full documentation at tokencost.dev

License

MIT

Available Tools

4 tools
calculate_estimateA

Estimate the cost for a given number of input and output tokens on a specific model. Supports optional cached_tokens for prompt caching discounts.

ParametersJSON Schema
NameRequiredDescriptionDefault
model_nameYesModel name (fuzzy matched)
input_tokensYesNumber of input tokens
output_tokensYesNumber of output tokens
cached_tokensNoNumber of input tokens served from cache (prompt caching). Must be <= input_tokens. These tokens are billed at the cached rate instead of the standard input rate.

TDQS

A3.6/5.0
Behavior3/5

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

No annotations provided, so description bears full burden. It reveals that cached_tokens must be <= input_tokens and are billed differently, but does not specify behavior for unknown models or whether the tool is idempotent/read-only.

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?

Two concise sentences, front-loaded with main purpose. No redundant information.

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

Completeness2/5

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

No output schema and description omits what the tool returns (e.g., estimated cost, currency). Also lacks examples or error cases. Incomplete for a cost estimation tool.

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

Parameters4/5

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

Schema coverage is 100%, baseline 3. Description adds value by clarifying that cached_tokens must be <= input_tokens and that they trigger a different billing rate, which is extra context beyond the schema.

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 estimates cost for tokens on a specific model, with mention of cached token discounts. This distinguishes it from sibling tools like compare_models and get_model_details.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives, nor any when-not-to-use conditions. The description only implies usage for cost estimation.

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

compare_modelsA

Filter and compare models by provider, minimum context window, or mode. Returns top 5 most cost-effective matches.

ParametersJSON Schema
NameRequiredDescriptionDefault
providerNoFilter by provider (e.g. 'anthropic', 'openai', 'google', 'amazon')
min_contextNoMinimum context window size in tokens
modeNoFilter by mode (e.g. 'chat', 'embedding', 'completion', 'image_generation')

TDQS

A3.8/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses read behavior and returns top 5 matches, but does not mention side effects, authentication needs, or behavior when no matches found.

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, 20 words, with no waste. It front-loads the purpose and is appropriately sized for the tool's simplicity.

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?

Given the tool's simplicity (3 optional params, no output schema), the description covers filtering and output summary. Minor gap: does not clarify if filters combine or define 'cost-effective'. Still adequate for selection.

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 description coverage is 100%, so baseline is 3. The description repeats parameter names but does not add meaningful usage context beyond what the schema already provides.

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 filters and compares models by provider, min context, or mode, returning top 5 cost-effective matches. It uses specific verbs and resources, distinguishing it from siblings like get_model_details.

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 usage for comparing models but lacks explicit guidance on when to use this tool versus alternatives (e.g., get_model_details for single model info). No exclusions or prerequisites are mentioned.

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

get_model_detailsA

Look up pricing, context window, and capabilities for an LLM model. Uses fuzzy matching so you don't need the exact model key.

ParametersJSON Schema
NameRequiredDescriptionDefault
model_nameYesModel name to look up (e.g. 'claude-sonnet-4-5', 'gpt-4o', 'gemini-2.0-flash')

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It adds value by disclosing fuzzy matching behavior, but does not mention failure cases, authentication needs, or any side effects. More detail would improve transparency.

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 extremely concise: two sentences with no wasted words. The primary function is stated in the first sentence, and the second adds a key behavioral detail. Every word earns its place.

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?

Given the tool has only one parameter and no output schema, the description is fairly complete. It covers the main purpose, key behavior (fuzzy matching), and the parameter is well-documented. It could mention the return format, but overall adequate.

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 100% for the single parameter, and the schema already describes it well with examples. The description does not add additional semantics beyond the schema, so baseline score of 3 is appropriate.

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 function: looking up pricing, context window, and capabilities for an LLM model. It distinguishes itself from siblings by specifying unique features like fuzzy matching, and the verb 'look up' plus resource 'LLM model details' is specific.

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 usage when you need model details without an exact name, but it does not explicitly state when to use versus alternatives like 'compare_models' or 'refresh_prices'. No when-not or exclusion criteria are provided.

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

refresh_pricesA

Force a re-fetch of pricing data from the LiteLLM registry. Use this if you suspect the cached data is stale.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/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 of behavioral disclosure. It indicates a forceful re-fetch operation, implying a potential side effect (updating cache). However, it does not disclose permissions, rate limits, or whether this operation is idempotent or destructive. The description is adequate for a simple tool but lacks deeper behavioral context.

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 two sentences, front-loads the action, and every sentence earns its place. There is no unnecessary information, achieving high conciseness for the tool's simplicity.

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

Completeness5/5

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

Given the tool's low complexity (no parameters, no output schema), the description is complete. It explains what the tool does and when to use it, covering all essential information for an agent to select and invoke it correctly.

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

Parameters4/5

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

The tool has zero parameters, so the baseline score is 4. The description does not need to add parameter semantics, and it appropriately focuses on behavior rather than parameters.

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 action ('Force a re-fetch') and the resource ('pricing data from the LiteLLM registry'), making the purpose highly specific. It distinguishes itself from siblings like 'calculate_estimate' and 'get_model_details' which have different purposes.

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

Usage Guidelines4/5

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

The description gives a clear condition for use: 'Use this if you suspect the cached data is stale.' However, it does not explicitly mention when not to use it or name alternatives. Despite this, the condition is actionable and guides the agent effectively.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.3
    • First observedcalculate_estimate
    • First observedcompare_models
    • First observedget_model_details
    • First observedrefresh_prices

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a distinct, non-overlapping purpose: estimate cost, compare models, get model details, and refresh pricing data. No confusion possible.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (e.g., calculate_estimate, compare_models), making them predictable and easy to understand.

Tool Count5/5

With 4 tools, the set is appropriately scoped for a token cost estimation server. Each tool serves a necessary function without bloat.

Completeness4/5

The tool set covers the core lifecycle: estimate costs, compare models, retrieve details, and refresh data. Minor gap: no explicit listing of all available models, though get_model_details uses fuzzy matching.

Maintenance

ActivityActive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/atriumn/tokencost-dev'

If you have feedback or need assistance with the MCP directory API, please join our Discord server