Skip to main content
Glama

estimate_cost

Estimate the cost of using a specific LLM model

Input Schema

NameRequiredDescriptionDefault
countryNoOptional ISO-3166 alpha-2 country whose currency to use (e.g. DE -> EUR, IN -> INR). A country whose currency is unsupported yields USD with fallback_to_usd=true.
currencyNoOptional ISO-4217 code to convert prices into, alongside the canonical USD figures. Beats country. Unsupported codes return success=false listing the supported set.
model_nameYesName of the LLM model (e.g., 'gpt-4', 'claude-3-opus')
input_tokensYesNumber of input tokens
output_tokensYesNumber of output tokens

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / country
      Added value: +{
      +  "description": "Optional ISO-3166 alpha-2 country whose currency to use (e.g. DE -> EUR, IN -> INR). A country whose currency is unsupported yields USD with fallback_to_usd=true.",
      +  "maxLength": 2,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "Optional ISO-4217 code to convert prices into, alongside the canonical USD figures. Beats country. Unsupported codes return success=false listing the supported set.",
      +  "enum": [
      +    "USD",
      +    "EUR",
      +    "GBP",
      +    "INR",
      +    "JPY",
      +    "CAD",
      +    "AUD",
      +    "BRL",
      +    "CNY",
      +    "SGD",
      +    "CHF",
      +    "KRW",
      +    "MXN"
      +  ],
      +  "type": "string"
      +}
  2. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries full burden but only restates the basic purpose. It does not disclose important behaviors like currency fallback, handling of unsupported models, or what the response includes, leaving the agent to infer from the schema alone.

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?

The description is a single, front-loaded sentence with no wasted words. It is efficient, though its extreme brevity leaves gaps that could be filled without sacrificing conciseness.

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

Completeness2/5

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

Given the tool has 5 parameters, 3 required, and no output schema, the description is too sparse. It does not explain return values, currency handling, or edge cases like unsupported models, which an agent would need to know for correct invocation.

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 the schema already documents all parameters thoroughly. The description adds no additional meaning beyond what the schema provides, which is acceptable given the high coverage.

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 states a specific verb ('Estimate') and resource ('cost of using a specific LLM model'), making the core action clear. However, it does not differentiate this tool from siblings like predict_cost or compare_costs, which also deal with cost estimation.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as predict_cost, compare_costs, or get_all_pricing. No exclusions, prerequisites, or context for selection are provided.

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.