Skip to main content
Glama

Estimate Cost

estimate_cost
Read-onlyIdempotent

Calculate per-call, daily, and monthly costs for LLM workloads across models, including cache savings and non-cache costs.

Instructions

What a workload costs on each model at its cheapest listing: per call, per day and per 30 days. With cached or cache write tokens, also the cost without the cache and the saving.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelsYes1 to 10 model names
input_tokensYesPrompt tokens per call
cached_tokensNoHow many of the prompt tokens are read from the cache
calls_per_dayNoCalls per day
output_tokensYesAnswer tokens per call, including hidden thinking
cache_write_tokensNoHow many of the prompt tokens are written to the cache

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.7

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld=false/idempotent, so the safety profile is covered. The description adds genuinely useful behavior beyond that: results use the cheapest listing rather than a specific price, are reported across three time horizons, and when cache tokens are supplied it also returns the no-cache cost and the savings. This is real added context, not a restatement of annotations.

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?

Two tight sentences with no filler. The core output shape is front-loaded before the conditional cache behavior, and every clause carries information an agent needs.

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?

With an output schema present, return values need not be explained, and all six parameters are fully documented in the schema. The description adds the caching nuance and the 'cheapest listing' basis, leaving only cross-tool routing unaddressed.

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 description coverage is 100%, so the baseline is 3. The description goes further by explaining the conditional effect of cached_tokens and cache_write_tokens on the output (cost without cache plus savings) and by implying the role of calls_per_day through the per-day/per-30-day horizons.

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 precisely what is computed: the cost of a workload on each model at its cheapest listing, broken into per-call, per-day and per-30-day figures. The 'cheapest listing' qualifier and the token-cache clause make the scope unambiguous. It does not, however, explicitly differentiate itself from siblings such as estimate_time, price_history or compare_models.

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?

Usage is implied by the framing ('what a workload costs'), so an agent can infer this is the cost-estimation counterpart to estimate_time. There is no explicit when-to-use statement, no prerequisites, and no routing to or away from alternatives like price_history or compare_models.

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