Skip to main content
Glama

estimate_cost

Estimate the USD cost of an LLM API call for a given model and token counts. Returns input/output/total cost, plus reseller markup vs. the upstream model when applicable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel id in provider/model form, e.g. anthropic/claude-opus-4-8. Use list_models to discover ids.
input_tokensYesNumber of input (prompt) tokens.
output_tokensYesNumber of output (completion) tokens.

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that it returns a cost breakdown and markup info. However, it does not explicitly state that the operation is read-only or safe, but the name 'estimate' inherently suggests non-destructiveness.

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 concise sentences with no filler. The description is front-loaded, starting with the main action and result.

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

Completeness5/5

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

Given the absence of an output schema, the description adequately explains the return format. All necessary aspects (purpose, parameters, output) are covered. Sibling tools do not overlap.

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 the schema already describes all parameters. The description adds value by explaining the output (cost breakdown) and guiding the user to use list_models for model IDs. This exceeds the baseline of 3.

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?

The description clearly states it estimates USD cost for an LLM API call for a given model and token counts, and explicitly lists the return values (input/output/total cost, plus reseller markup). It is distinct from sibling tools like list_models or get_price_history.

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 description implies usage for cost estimation but does not explicitly state when to use this tool versus alternatives, nor does it provide any exclusions or prerequisites. The siblings are different functions, but guidance on when not to use is missing.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Tools are mostly distinct, but list_deprecations and list_events overlap in covering deprecations. Descriptions clarify that list_deprecations is specific to retirement schedules with runways, while list_events is a broader changelog filterable by severity, so an agent could still choose correctly.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case (e.g., list_models, get_model, estimate_cost). The length variation is minor and does not break the pattern.

Tool Count5/5

Seven tools is an ideal size for this domain—enough to cover key operations (listing, getting details, checking dependencies, estimating costs, viewing history) without overwhelming the agent. Each tool has a clear role.

Completeness4/5

The tool set covers the main use cases for model information and monitoring. A minor gap is the lack of a dedicated tool to list providers, though list_models can filter by provider name. Overall, CRUD-like coverage is good for a read-heavy informational server.