Skip to main content
Glama

Estimate LLM cost

estimate_cost
Read-onlyIdempotent

Estimate USD cost per model from text or input_tokens plus output_tokens using a dated price table (prices_as_of 2026-10-27). Estimates, not live billing.

Input Schema

NameRequiredDescriptionDefault
textNoText (≤256 KB). URLs are not fetched.
modelsNo
input_tokensNo
output_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so safety is covered. The description adds real value by disclosing the dated price table (prices_as_of 2026-10-27) and that figures are estimates, not live billing. It does not describe the response shape or how per-model results are keyed.

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 terse sentences, front-loaded with the core action and inputs, with the pricing caveat immediately after. No filler.

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

Completeness3/5

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

All parameters are optional (required=0) and there is no output schema, yet the description never explains default behavior when neither text nor tokens are supplied, nor the shape of the returned cost breakdown. The pricing-currency and freshness facts are good, but the call/return contract is under-specified.

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 coverage is only 25%, so the description has to carry weight; it does clarify the two input modes ('text or input_tokens plus output_tokens'), which the schema does not explain for those bare integer params. It says nothing about the 'models' array — whether it is required, what happens if omitted, or how it controls per-model output.

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?

States a specific verb and resource ('Estimate USD cost per model') and names both input modes (text vs. token counts), so the purpose is unambiguous. It does not explicitly contrast itself with siblings like count_tokens, but the cost-orientation makes it distinguishable without opening the schema.

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 'Estimates, not live billing' caveat gives useful usage context for when not to rely on the result for invoicing. However, there is no guidance on when to pick this over count_tokens, or on which input mode (text vs. tokens) to prefer.

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.

Resources