Skip to main content
Glama

estimate_cost

Read-only

Calculate monthly LLM costs for described workloads or measured token usage across multiple models, accounting for caching, long-context tiers, reasoning tokens, and batch discounts.

Instructions

Monthly cost of a described workload, or of measured usage, on each model. Accounts for history compounding, cache writes, long-context tiers and reasoning tokens. Use this instead of multiplying prices by hand.

Input Schema

NameRequiredDescriptionDefault
turnsNoTurns per conversation. Default 4.
usageNoMeasured totals to price instead: input, output, cache_read, cache_write tokens (input excludes cache reads).
modelsYesUp to about 8.
user_tokensNoTypical user message. Default 150.
output_tokensNoTypical reply. Default 350.
system_tokensNoSystem prompt size. Default 800.
use_batch_apiNoApply batch discounts.
cached_input_shareNo0-1. Default 0.
reasoning_multiplierNoBill output at this multiple. Default 1.
conversations_per_dayNoDefault 1000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.3
    • changedInput schema / properties / models / description
      Previous value: -"Models to compare, up to about 8."New value: +"Up to about 8."
    • addedInput schema / properties / usage
      Added value: +{
      +  "additionalProperties": {
      +    "type": "number"
      +  },
      +  "description": "Measured totals to price instead: input, output, cache_read, cache_write tokens (input excludes cache reads).",
      +  "type": "object"
      +}
    • changedInput schema / properties / use_batch_api / description
      Previous value: -"Apply batch discounts. Default false."New value: +"Apply batch discounts."
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

The description adds meaningful behavioral detail beyond the readOnly/openWorld annotations by naming history compounding, cache writes, long-context tiers, and reasoning tokens as modelled factors. However, with openWorldHint=true, it does not disclose where pricing data comes from, how fresh it is, or what the response shape looks like, leaving meaningful behavioral gaps.

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

Conciseness5/5

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

Three tight sentences, front-loaded with what is computed, then the modelling factors, then the usage rationale. There is no filler, and every sentence contributes information.

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

Completeness4/5

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

Given 10 parameters, a nested usage object, and no output schema, the description is reasonably complete on the computation model. Still, it omits currency, pricing data source/freshness under openWorldHint, and any indication of the return structure beyond 'on each model', which leaves some gaps for an agent reasoning about outputs.

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

Parameters3/5

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

Schema description coverage is 100%, so parameter meanings are already well documented in the schema. The description only lightly clarifies the workload-vs-measured-usage distinction and does not add format or interpretation details beyond what the schema provides, making baseline 3 appropriate.

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

Purpose4/5

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

The description states a specific verb and resource: estimating monthly cost per model for either a described workload or measured usage. It does not explicitly differentiate itself from siblings get_price and find_cheaper, though the modelling behavior implies it is the calculation tool rather than a raw price lookup or optimization helper.

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

Usage Guidelines3/5

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

The phrase 'Use this instead of multiplying prices by hand' gives implied usage guidance, but it does not state when to choose this over get_price or find_cheaper, nor does it give explicit preconditions or exclusions. The usage context is inferable but not fully specified.

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

Deploy Server

Other Tools