Skip to main content
Glama

Estimate Cost

estimate_cost
Read-onlyIdempotent

Price a known workload from token counts and daily calls across 1–10 models at each model’s cheapest listing, showing cost per call, day, 30 days, and cache savings.

Instructions

Price a workload on 1 to 10 models at each one's cheapest listing: dollars per call, per day and per 30 days, and with cache tokens the saving the cache makes. Use when the question is a budget or a bill: token counts and calls a day are known. Not for deciding which model is better (compare_models) or for pricing past usage from an export (price_my_usage).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "models": "<models>",
      "input_tokens": "<input_tokens>",
      "output_tokens": "<output_tokens>"
    },
    "name": "estimate_cost"
  }
}

Input 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

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.7

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so safety and determinism are covered. The description adds real context beyond them: pricing uses each model's cheapest listing and reports cache savings, which an agent needs to interpret results. It stops short of noting what happens to models lacking a listing, which is a minor gap given a sibling named not_yet_priced.

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 sentences, front-loaded with the action and output shape, followed by usage routing. Every clause carries information; no padding or repeated name/title text.

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, the description needn't detail return values, and its output summary plus usage routing is sufficient to call the tool correctly. The only omission is behavior for models without a price listing, a small but real gap for a pricing tool.

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 all six parameters including cached_tokens and cache_write_tokens are already documented in the schema. The description only restates that token counts and daily call volume are inputs, adding no syntax, units, or edge-case guidance beyond the structured fields. Baseline 3 applies.

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 (price) and resource (a workload across 1–10 models), and specifies the outputs returned: dollars per call, per day, per 30 days, plus cache savings. The scope (cheapest listing per model) makes it clearly distinct from compare_models and price_my_usage.

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?

Gives an explicit trigger ('when the question is a budget or a bill: token counts and calls a day are known') and names two alternatives with the conditions that select them, compare_models for quality decisions and price_my_usage for export-based pricing. 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.