modelcostsaver
v0.1.1Offline MCP: predict LLM call cost and pick the cheapest capable model.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
estimate_cost Estimate cost
Estimate the cost of a single LLM call for one model from known or estimated token counts. Offline, no keys.
| Parameter | Type | Description |
|---|---|---|
model * | string | Model alias or full id, e.g. "sonnet" or "claude-sonnet-4-6". |
charsPerToken | number | Override the chars-per-token heuristic divisor. |
expectedOutputText | string | Expected output text; estimated if outputTokens is absent. |
inputText | string | Prompt text; estimated to tokens if inputTokens is absent. |
inputTokens | integer | Exact input tokens; optional if inputText is given. |
outputTokens | integer | Exact output tokens; defaults to the model output cap. |
predict_cost Predict cost
Forecast the cost of a prompt across candidate models before the call. Returns a cheapest-first ranking with assumptions. Offline.
| Parameter | Type | Description |
|---|---|---|
candidates | array | Candidate models (alias or id); defaults to all chat-capable. |
charsPerToken | number | |
contextTokens | integer | Known context tokens already loaded. |
expectedOutputTokens | integer | Exact output tokens; else inferred from taskClass/model. |
includeLocal | boolean | |
inputTokens | integer | Exact input tokens (skips prompt estimation). |
prompt | string | The prompt to forecast; estimated to tokens if inputTokens absent. |
providers | array | Axis 1: provider availability allowlist (spec 5.4). |
target | string | Axis 2: "self" (default) applies the client scope; "code" considers all providers. |
taskClass | string | Drives the default output cap. |
select_optimal_model Select optimal model
Pick the single cheapest model that meets the task tier, capabilities, and budget, with full reasoning and a fallbackChain. Offline.
| Parameter | Type | Description |
|---|---|---|
estimatedInputTokens * | integer | Estimated input tokens for the forecast. |
estimatedOutputTokens * | integer | Estimated output tokens for the forecast. |
includeLocal | boolean | |
maxCostUsd | number | Budget ceiling for the predicted call cost. |
providers | array | Axis 1: provider availability allowlist (spec 5.4). |
requiredCapabilities | array | Capabilities the model must support. |
target | string | Axis 2: "self" (default) applies the client scope; "code" considers all providers. |
task | string | Free-text task; used for the tier heuristic when taskClass is absent. |
taskClass | string | Explicit task class; overrides the heuristic. |
compare_models Compare models
Compare models side by side for a fixed token shape, cheapest first, with the multiple of the cheapest. Offline.
| Parameter | Type | Description |
|---|---|---|
inputTokens * | integer | Input tokens for the comparison. |
models * | array | Models to compare (alias or id). |
outputTokens * | integer | Output tokens for the comparison. |
providers | array | Axis 1: provider availability allowlist (spec 5.4). |
target | string | Axis 2: "self" (default) applies the client scope; "code" considers all providers. |
list_models List models / pricing
Return the model catalog with pricing, optionally filtered. capabilities are arrays. Offline.
| Parameter | Type | Description |
|---|---|---|
capability | string | Require a capability. |
includeLocal | boolean | Include local / self-hosted $0 models (off by default). |
maxInputPerMillion | number | Only models at or below this input price per 1M tokens. |
provider | string | Filter to a single provider. |
tier | string | Filter to a single tier. |
get_pricing List models / pricing
Return the model catalog with pricing, optionally filtered. capabilities are arrays. Offline.
| Parameter | Type | Description |
|---|---|---|
capability | string | Require a capability. |
includeLocal | boolean | Include local / self-hosted $0 models (off by default). |
maxInputPerMillion | number | Only models at or below this input price per 1M tokens. |
provider | string | Filter to a single provider. |
tier | string | Filter to a single tier. |
optimize_request Optimize request
Check whether a cheaper capable model exists for a call you plan to make, and report the savings. Offline.
| Parameter | Type | Description |
|---|---|---|
currentModel * | string | The model you plan to call (alias or id). |
inputTokens * | integer | Input tokens for the call. |
outputTokens * | integer | Output tokens for the call. |
crossProvider | boolean | Consider other providers too (may need a different API key). Default false. |
includeLocal | boolean | |
providers | array | Axis 1: provider availability allowlist (spec 5.4). |
target | string | Axis 2: "self" (default) applies the client scope; "code" considers all providers. |
taskClass | string | Task class; sets the tier the recommendation must still meet. |