Skip to main content
Glama

AI Wisdom

Estimate LLM API cost

estimate_llm_cost
Read-only

Estimates and compares LLM API cost for a workload (input, cached input and output tokens per request, times the number of requests) across current models or the ones you name, cheapest first, from list prices in the AI Wisdom model registry, each with the date it was verified.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inputTokens": "<inputTokens>",
      "outputTokens": "<outputTokens>"
    },
    "name": "estimate_llm_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelsNoModel ids or names to compare. Leave empty for every current production model with a verified price.
requestsNoNumber of requests, for example per day or per month (default 1).
inputTokensYesInput (prompt) tokens per request.
outputTokensYesOutput tokens per request.
cachedInputTokensNoOf the input tokens, how many are cache reads (priced lower where the vendor offers caching).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral facts: the price source (list prices in the AI Wisdom model registry), the result ordering (cheapest first), and that each price carries its verification date — all useful for judging freshness of an estimate.

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?

A single front-loaded sentence: verb first, workload definition second, then scope, ordering, and provenance. The parenthetical carries real information rather than restating the parameter names, and there is no filler.

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?

For a 5-parameter read-only estimator with no output schema, the description supplies what matters: how cost is derived, which models are compared by default, and that prices are dated. Minor omissions remain — currency assumption and fallback behavior for unnamed models — but nothing essential to calling it correctly is missing.

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 100% and every parameter is already documented in the schema, so this is the baseline case. The description echoes the input/cached/output-per-request and requests-multiplier model, but adds no syntax detail such as the default requests=1, the 10-model cap, or behavior for unrecognized model names.

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 verb pair ('estimates and compares') and resource ('LLM API cost for a workload'), then defines the workload precisely as token counts times requests. No sibling tool in the list does cost comparison, so the agent can route here without ambiguity.

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 makes the usage context clear: compare across 'current models or the ones you name,' and results come back 'cheapest first.' It does not explicitly exclude alternatives or point at list_models for plain model enumeration, so the when-not guidance is absent.

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