Skip to main content
Glama

Estimate the cost of a workload

estimate_cost
Read-onlyIdempotent

Estimated cost of a workload on one model at each provider: cost per request, and per month if requests_per_day is given, taking the provider's tiered pricing and prompt-cache price into account. Offers sorted by estimated cost, cheapest first: the cheapest in detail, then one short line per offer with its estimated cost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of offers to return, cheapest included (default 5, max 25)
modelYesModel id or name, e.g. 'deepseek-v3.2', 'deepseek/deepseek-v4-pro', 'gpt-5.6-luna'. Use search_models when unsure.
detailNocompact (default): the winner in detail and one short line per other offer (provider, prices, signals, training on prompts when published). full: every field of every offer (all published conditions, reliability), much longer
cached_ratioNoShare of input tokens served from the provider's prompt cache (0 to 1)
output_tokensNoOutput tokens per request, for the estimated cost
prompt_tokensNoInput tokens per request, for the estimated cost
requests_per_dayNoRequests per day, to also get an estimated monthly cost

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / detail
      Added value: +{
      +  "description": "compact (default): the winner in detail and one short line per other offer (provider, prices, signals, training on prompts when published). full: every field of every offer (all published conditions, reliability), much longer",
      +  "enum": [
      +    "compact",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Number of offers to return (default 5, max 25)"New value: +"Number of offers to return, cheapest included (default 5, max 25)"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered. The description adds real behavioral context the annotations don't: tiered pricing and prompt-cache pricing are factored in, offers are sorted cheapest-first, and the return layout (one detailed winner plus short lines) is disclosed.

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?

Two sentences, front-loaded with the core purpose and then the output structure, with no filler. It is dense but every clause carries information; slightly heavy sentence construction keeps it from a 5.

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 no output schema, the description usefully compensates by describing the returned offer list and its ordering. For a 7-parameter tool it leaves the alternative-selection question unanswered, but nothing needed to call it correctly is missing.

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 baseline is 3, but the description adds meaning beyond the schema by tying requests_per_day to a monthly estimate and explaining that the prompt-cache price feeds the cached_ratio calculation. It does not, however, supply defaults or formats for prompt_tokens/output_tokens.

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 gives a specific verb+resource ('estimated cost of a workload on one model at each provider') and even characterizes the output shape, so the agent knows exactly what it computes. It does not, however, contrast itself with the sibling tools (cheapest, compare_providers), so it falls short of a 5.

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 only implied: the conditional 'per month if requests_per_day is given' hints at when the monthly figure appears, but there is no explicit statement of when to pick this over compare_providers or cheapest, nor any prerequisite guidance. Adequate but with a clear gap.

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.