tokencost-dev
v0.1.3LLM pricing oracle — model lookup, cost estimation, and comparison via LiteLLM
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_model_details
Look up pricing, context window, and capabilities for an LLM model. Uses fuzzy matching so you don't need the exact model key.
| Parameter | Type | Description |
|---|---|---|
model_name * | string | Model name to look up (e.g. 'claude-sonnet-4-5', 'gpt-4o', 'gemini-2.0-flash') |
calculate_estimate
Estimate the cost for a given number of input and output tokens on a specific model. Supports optional cached_tokens for prompt caching discounts.
| Parameter | Type | Description |
|---|---|---|
input_tokens * | number | Number of input tokens |
model_name * | string | Model name (fuzzy matched) |
output_tokens * | number | Number of output tokens |
cached_tokens | number | Number 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. |
compare_models
Filter and compare models by provider, minimum context window, or mode. Returns top 5 most cost-effective matches.
| Parameter | Type | Description |
|---|---|---|
min_context | number | Minimum context window size in tokens |
mode | string | Filter by mode (e.g. 'chat', 'embedding', 'completion', 'image_generation') |
provider | string | Filter by provider (e.g. 'anthropic', 'openai', 'google', 'amazon') |
refresh_prices
Force a re-fetch of pricing data from the LiteLLM registry. Use this if you suspect the cached data is stale.