Skip to main content
Glama

InferIndex

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of offers to return (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.
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. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true; the description adds meaningful behavior beyond that: it accounts for provider tiered pricing and prompt-cache price, and sorts offers by estimated cost ascending. These details tell the agent what factors influence results and output ordering.

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, front-loaded with the core purpose and scoping (one model, per provider), then key behaviors and sorting. Every clause earns its place; no filler or repetition of schema details.

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?

Without an output schema, the description adequately explains the return values: offers with cost per request and per-month cost (if requests_per_day is given). It could clarify what happens when token counts are omitted, but overall the tool's behavior is sufficiently complete for an agent to call and interpret it.

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 already have clear meanings. The description adds some linking context (requests_per_day triggers monthly cost; prompt-cache price affects cached_ratio), but it does not substantially extend the schema's parameter documentation. Baseline 3 is appropriate.

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 action (estimate cost) on a specific resource (a workload on one model at each provider), and details the calculation: per-request and per-month cost, tiered pricing, prompt-cache price, and cheapest-first sorting. This clearly distinguishes it from siblings like price_history or search_models.

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

Usage Guidelines4/5

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

The description gives a clear context: estimating workload costs with optional token and request-volume inputs. It does not explicitly name alternatives or exclusions, but the sibling names differ enough (cheapest, compare_providers, price_history) that an agent can infer when estimate_cost is appropriate.

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.