Skip to main content
Glama

Estimate LLM Cost

estimate-llm-cost
Read-only

Cost a workload with EXACT numbers the caller supplies: arbitrary token counts per request and any monthly volume, not just the 10k/100k/1m presets the other cost tools use. Use this for 'about 800 in and 200 out, 4 million calls a month', or to price one named model across every use-case profile. To compare 2-4 named models like for like at a preset volume, use compare-models-side-by-side instead. Provide a model name to get detailed cost breakdowns, or compare costs across all use case presets. Each figure comes twice: list price, and the optimized price achievable with prompt caching and the batch API. Cost figures are final as returned: rounded server-side and dated by provenance, with the lever behind each saving, or the reason there is none, named in the text.

Input Schema

NameRequiredDescriptionDefault
modelNameNoModel name, e.g. 'GPT-4o'. A partial name matches up to 5 models and ALL of them are costed. If omitted, the first 8 catalogue entries are used — that is catalogue order, not a quality ranking.
monthlyVolumeNoExact monthly request count, any integer (default 100,000). This tool does not take the 10k/100k/1m presets the other cost tools use.
useCasePresetNoWorkload shape, which sets tokens per request: supportTicket (1.5k in / 500 out), knowledgeQA (2k / 800), meetingSummary (10k / 1.2k, batch-eligible), marketingContent (2.5k / 1.8k), codingTask (3k / 2k), invoiceProcessing (1.5k / 600, batch-eligible), callSummary (2k / 700, batch-eligible), agentWorkflow (6k / 3k). Default: every preset.
customInputTokensNoCustom input tokens per request. Must be supplied TOGETHER with customOutputTokens — either alone is ignored and the preset is used. A custom shape assumes no cacheable prefix and no batch eligibility, so its optimized cost equals its list cost.
customOutputTokensNoCustom output tokens per request. Must be supplied TOGETHER with customInputTokens — either alone is ignored and the preset is used.

Output Schema

NameRequiredDescriptionDefault
errorNo
sourceYes
volumeYes
eloAsOfYes
dataAsOfNo
modelCostsYes
provenanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / properties / customInputTokens / description
      Previous value: -"Custom input tokens per request (overrides preset)"New value: +"Custom input tokens per request. Must be supplied TOGETHER with customOutputTokens — either alone is ignored and the preset is used. A custom shape assumes no cacheable prefix and no batch eligibility, so its optimized cost equals its list cost."
    • changedInput schema / properties / customOutputTokens / description
      Previous value: -"Custom output tokens per request (overrides preset)"New value: +"Custom output tokens per request. Must be supplied TOGETHER with customInputTokens — either alone is ignored and the preset is used."
    • changedInput schema / properties / modelName / description
      Previous value: -"Model name to estimate costs for (e.g. 'GPT-4o', 'Claude Sonnet 4'). If omitted, shows top models."New value: +"Model name, e.g. 'GPT-4o'. A partial name matches up to 5 models and ALL of them are costed. If omitted, the first 8 catalogue entries are used — that is catalogue order, not a quality ranking."
    • changedInput schema / properties / monthlyVolume / description
      Previous value: -"Custom monthly volume (default: 100,000)"New value: +"Exact monthly request count, any integer (default 100,000). This tool does not take the 10k/100k/1m presets the other cost tools use."
    • changedInput schema / properties / useCasePreset / description
      Previous value: -"Use case preset. Default: all presets."New value: +"Workload shape, which sets tokens per request: supportTicket (1.5k in / 500 out), knowledgeQA (2k / 800), meetingSummary (10k / 1.2k, batch-eligible), marketingContent (2.5k / 1.8k), codingTask (3k / 2k), invoiceProcessing (1.5k / 600, batch-eligible), callSummary (2k / 700, batch-eligible), agentWorkflow (6k / 3k). Default: every preset."
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / batchApplied
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / batchEligible
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / cacheApplied
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / cacheEligible
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / savingsPct
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / properties / modelCosts / items / properties / costs / items / required
      Previous value: -[
      -  "useCase",
      -  "inputTokens",
      -  "outputTokens",
      -  "perRequest",
      -  "monthly",
      -  "perRequestOptimized",
      -  "monthlyOptimized"
      -]New value: +[
      +  "useCase",
      +  "inputTokens",
      +  "outputTokens",
      +  "perRequest",
      +  "monthly",
      +  "perRequestOptimized",
      +  "monthlyOptimized",
      +  "savingsPct",
      +  "batchEligible",
      +  "cacheEligible",
      +  "batchApplied",
      +  "cacheApplied"
      +]
  2. Changed2 schema fields changed
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "catalogTotal": {
      +      "type": "number"
      +    },
      +    "dataAsOf": {
      +      "type": "string"
      +    },
      +    "eloAsOf": {
      +      "type": "string"
      +    },
      +    "label": {
      +      "type": "string"
      +    },
      +    "notice": {
      +      "type": "string"
      +    },
      +    "pricesVerified": {
      +      "type": "boolean"
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "tier": {
      +      "type": "number"
      +    },
      +    "upstreamSchemaVersion": {
      +      "type": "string"
      +    },
      +    "upstreamSource": {
      +      "type": "string"
      +    },
      +    "upstreamTimestamp": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tier",
      +    "source",
      +    "label",
      +    "pricesVerified",
      +    "eloAsOf"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • changedOutput schema / $schema
      Previous value: -"https://json-schema.org/draft/2020-12/schema"New value: +"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / properties / provenance
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "catalogTotal": {
      -      "type": "number"
      -    },
      -    "dataAsOf": {
      -      "type": "string"
      -    },
      -    "eloAsOf": {
      -      "type": "string"
      -    },
      -    "label": {
      -      "type": "string"
      -    },
      -    "notice": {
      -      "type": "string"
      -    },
      -    "pricesVerified": {
      -      "type": "boolean"
      -    },
      -    "source": {
      -      "type": "string"
      -    },
      -    "tier": {
      -      "type": "number"
      -    },
      -    "upstreamSchemaVersion": {
      -      "type": "string"
      -    },
      -    "upstreamSource": {
      -      "type": "string"
      -    },
      -    "upstreamTimestamp": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "tier",
      -    "source",
      -    "label",
      -    "pricesVerified",
      -    "eloAsOf"
      -  ],
      -  "type": "object"
      -}
  4. Changed2 schema fields changed
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "catalogTotal": {
      +      "type": "number"
      +    },
      +    "dataAsOf": {
      +      "type": "string"
      +    },
      +    "eloAsOf": {
      +      "type": "string"
      +    },
      +    "label": {
      +      "type": "string"
      +    },
      +    "notice": {
      +      "type": "string"
      +    },
      +    "pricesVerified": {
      +      "type": "boolean"
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "tier": {
      +      "type": "number"
      +    },
      +    "upstreamSchemaVersion": {
      +      "type": "string"
      +    },
      +    "upstreamSource": {
      +      "type": "string"
      +    },
      +    "upstreamTimestamp": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tier",
      +    "source",
      +    "label",
      +    "pricesVerified",
      +    "eloAsOf"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover safety (readOnlyHint, destructiveHint=false, openWorldHint), and the description adds real behavioral context beyond them: each figure returns both a list price and an optimized price achievable via prompt caching/batch API, rounded server-side and dated by provenance, with the saving lever named. That is genuinely useful disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded, with the exact-numbers-vs-presets distinction and the sibling alternative placed early. Every sentence carries content, though the description is on the longer side.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-required-param pricing tool with a full output schema, the description covers purpose, usage routing, parameter behavior, and return-value semantics sufficiently. An agent can select and invoke it correctly without opening the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds conceptual meaning beyond the schema: it frames the model-name path as yielding detailed breakdowns versus comparing across all presets, and clarifies the custom-token path implied by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (cost a workload) and immediately distinguishes itself from sibling cost tools by emphasizing EXACT caller-supplied numbers versus the 10k/100k/1m presets. It also carves out the comparison case by naming compare-models-side-by-side directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ('about 800 in and 200 out, 4 million calls a month') and explicit when-not/alternative ('To compare 2-4 named models like for like at a preset volume, use compare-models-side-by-side instead'). Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.