ModelCostSaver
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MODELCOSTSAVER_LEDGER | No | Enable the local record_usage write. Default is 'off'. | |
| MODELCOSTSAVER_REFRESH | No | Enable the opt-in remote catalog refresh. Default is 'off'. | |
| MODELCOSTSAVER_PROVIDER | No | Bias select_optimal_model toward a specific provider. Default is none. | |
| MODELCOSTSAVER_PROVIDERS | No | Allowlist for recommendations (e.g., 'anthropic,openai'). Default is client-derived. | |
| MODELCOSTSAVER_TELEMETRY | No | Telemetry setting (kept off for transparency). Default is 'off'. | |
| MODELCOSTSAVER_FAST_MODEL | No | Pin a preferred model for the fast tier. Default is catalog cheapest. | |
| MODELCOSTSAVER_CATALOG_URL | No | Override the refresh source URL. Default is bundled. | |
| MODELCOSTSAVER_INCLUDE_LOCAL | No | Surface self-hosted / $0 models. Default is 'off'. | |
| MODELCOSTSAVER_TRIVIAL_MODEL | No | Pin a preferred model for the trivial tier. Default is catalog cheapest. | |
| MODELCOSTSAVER_STANDARD_MODEL | No | Pin a preferred model for the standard tier. Default is catalog cheapest. | |
| MODELCOSTSAVER_CHARS_PER_TOKEN | No | Tune the token estimator. Default is '4'. | |
| MODELCOSTSAVER_REASONING_MODEL | No | Pin a preferred model for the reasoning tier. Default is catalog cheapest. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| estimate_costA | Estimate the cost of a single LLM call for one model from known or estimated token counts. Offline, no keys. |
| predict_costA | Forecast the cost of a prompt across candidate models before the call. Returns a cheapest-first ranking with assumptions. Offline. |
| select_optimal_modelB | Pick the single cheapest model that meets the task tier, capabilities, and budget, with full reasoning and a fallbackChain. Offline. |
| compare_modelsB | Compare models side by side for a fixed token shape, cheapest first, with the multiple of the cheapest. Offline. |
| list_modelsB | Return the model catalog with pricing, optionally filtered. capabilities are arrays. Offline. |
| get_pricingC | Return the model catalog with pricing, optionally filtered. capabilities are arrays. Offline. |
| optimize_requestA | Check whether a cheaper capable model exists for a call you plan to make, and report the savings. Offline. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| modelcostsaver | How and when to use ModelCostSaver: forecast cost and pick the cheapest capable model before an LLM call. |
| modelcostsaver-setup | Self-configure ModelCostSaver in this client. Hand this to your agent to set it up. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| catalog | The full model catalog with per-token pricing, tiers, and capabilities. Offline, versioned. |
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/sachinuppal/modelcostsaver'
If you have feedback or need assistance with the MCP directory API, please join our Discord server