Skip to main content
Glama
ankit-aglawe

tokencost-mcp-server

by ankit-aglawe

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
tokencost_get_model_pricingA

Get pricing details for a specific LLM model.

Args:

  • model (string): Model ID or name to look up (e.g., "gpt-5", "claude-sonnet-4.6", "gemini-3-pro")

Returns: Model pricing details including input/output costs per 1M tokens, context window, and max output. Returns an error message if the model is not found, with suggestions for similar models.

Examples:

  • "gpt-5" → GPT-5 pricing from OpenAI

  • "claude-opus-4.6" → Claude Opus 4.6 pricing from Anthropic

  • "gemini" → First matching Gemini model

tokencost_compare_modelsA

Compare pricing across multiple LLM models side by side.

Args:

  • models (string[]): Array of model IDs or names to compare (2-10 models)

Returns: Side-by-side comparison table with input/output costs, context windows, and relative cost differences.

Examples:

  • ["gpt-5", "claude-sonnet-4.6"] → Compare OpenAI vs Anthropic pricing

  • ["gpt-5-mini", "gemini-3-flash", "claude-haiku-4.5"] → Compare budget models

tokencost_estimate_costA

Calculate the cost for a specific number of input and output tokens with a given model.

Args:

  • model (string): Model ID or name

  • input_tokens (number): Number of input tokens (0 to 100B)

  • output_tokens (number): Number of output tokens (0 to 100B)

Returns: Cost breakdown with input cost, output cost, and total cost in USD.

Examples:

  • model="gpt-5", input_tokens=1000, output_tokens=500 → Cost for a typical API call

  • model="claude-sonnet-4.6", input_tokens=100000, output_tokens=4000 → Cost for a long context call

tokencost_find_cheapestA

Find the cheapest LLM models, optionally filtered by provider or minimum context window.

Args:

  • provider (string, optional): Filter by provider (e.g., "OpenAI", "Anthropic", "Google")

  • min_context (number, optional): Minimum context window size in tokens

  • sort_by (string, optional): Sort by "input", "output", or "combined" cost (default: "combined")

  • limit (number, optional): Number of results to return (default: 10, max: 30)

Returns: Ranked list of cheapest models with pricing details.

Examples:

  • {} → Top 10 cheapest models overall

  • { provider: "OpenAI" } → Cheapest OpenAI models

  • { min_context: 200000, sort_by: "input" } → Cheapest 200K+ context models by input price

tokencost_list_modelsA

List all available LLM models with pricing data, optionally filtered by provider.

Args:

  • provider (string, optional): Filter by provider (e.g., "OpenAI", "Anthropic", "Google")

Returns: List of all models with IDs, names, and providers. Use model IDs with other tools.

Examples:

  • {} → All 60+ models

  • { provider: "Anthropic" } → All Anthropic Claude models

tokencost_list_providersA

List all LLM providers with model counts and pricing ranges.

Returns: All providers with the number of models and pricing range for each.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.3/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: compare_models for side-by-side comparisons, estimate_cost for specific token calculations, find_cheapest for budget optimization, get_model_pricing for detailed lookups, list_models for catalog browsing, and list_providers for provider overview. The descriptions clearly differentiate their functions, eliminating any confusion about which tool to use for a given task.

Naming Consistency5/5

All tools follow a perfect verb_noun pattern with the 'tokencost_' prefix: compare_models, estimate_cost, find_cheapest, get_model_pricing, list_models, and list_providers. The naming is completely consistent, using descriptive verbs that accurately reflect each tool's function, making the set highly predictable and easy to navigate.

Tool Count5/5

Six tools is an ideal number for this server's purpose of LLM cost analysis. Each tool serves a distinct, valuable function in the workflow—from browsing models and providers to detailed comparisons and cost estimations—without any redundancy. The count is well-scoped, covering all essential operations without being overwhelming or insufficient for the domain.

Completeness5/5

The tool set provides complete coverage for LLM cost analysis: list_providers and list_models for discovery, get_model_pricing for detailed lookups, estimate_cost for calculations, compare_models for side-by-side analysis, and find_cheapest for optimization. There are no obvious gaps; agents can perform all typical cost-related tasks from exploration to decision-making without dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues