ai-cost-analyzer
v1.1.4Analyze LLM API costs: token waste detection, caching savings estimates, model comparison
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
analyze_usage
Analyze AI API usage data and return cost breakdowns by model, average cost per request, token waste estimation, and daily/weekly trends.
| Parameter | Type | Description |
|---|---|---|
usage_data * | array | Array of API usage records with model, tokens, and timestamps |
estimate_savings
Estimate potential monthly savings from prompt caching, model routing, and context pruning based on current usage patterns.
| Parameter | Type | Description |
|---|---|---|
usage_data * | array | Array of API usage records representing current usage patterns |
monthly_multiplier | number | If the usage_data is a sample, multiply costs by this factor to project monthly totals (default: 1) |
optimize_prompt
Analyze a system prompt and tool definitions, return an optimized version with redundant content removed, token counts before/after, and cost reduction estimates.
| Parameter | Type | Description |
|---|---|---|
system_prompt * | string | The system prompt text to optimize |
tool_definitions * | array | Array of tool definition strings (JSON or plain text) |
model | string | Model name for pricing calculation (default: claude-sonnet) |
requests_per_month | integer | Estimated requests per month for cost projection (default: 10,000) |
compare_models
Compare cost and quality tradeoffs across Claude, GPT-4o, GPT-4o-mini, and Gemini models for a given task. Returns cost per request, monthly projections, and recommendations.
| Parameter | Type | Description |
|---|---|---|
task_description * | string | Description of the task to compare models for |
estimated_input_tokens | integer | Override estimated input tokens per request |
estimated_output_tokens | integer | Override estimated output tokens per request |
get_pricing
Return current pricing for all major LLM APIs (Claude, OpenAI, Gemini) with input, output, and cached token rates per million tokens.