Skip to main content
Glama
edgedata-apis-mcp
by TnTIndie

ai_cost_estimate

Calculate exact USD cost for an LLM prompt/completion workload across models, helping you compare pricing and budget token usage.

Instructions

Calculate exact USD cost for an LLM prompt/completion workload across top models.

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": "ai_cost_estimate"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional model ID filter
inputTokensYesNumber of input tokens (e.g. 1000000)
outputTokensYesNumber of output tokens (e.g. 250000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose meaningful behavior in one line: the result is in USD, it is a pure calculation over a prompt/completion workload, and it spans multiple models ('across top models'). However, it says nothing about pricing data provenance or freshness, which models are actually covered, or whether a per-model breakdown is returned.

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?

A single front-loaded sentence with no filler; the action and scope come first. The only soft spot is the vague qualifier 'top models', which is efficient but imprecise.

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?

For a simple three-parameter calculator with full schema coverage and no annotations, the definition is adequate but thin. Because there is no output schema, the description should explain the return shape (single total vs. per-model comparison, currency handling), and it does not.

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 three parameters (model, inputTokens, outputTokens) are already documented, including the 'Optional model ID filter' semantics of model. The description adds no format or interpretation detail beyond that, so the baseline of 3 applies.

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 uses a specific verb ('Calculate') and a specific resource ('exact USD cost for an LLM prompt/completion workload across top models'), which is enough to distinguish it from a pricing-lookup sibling like llm_pricing_compare. It does not name or explicitly contrast with that sibling, so it stops short of a 5.

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?

Usage is only implied: an agent can infer it should call this when it has token counts and wants a dollar figure. There is no explicit when-to-use or when-not-to-use guidance and no mention of the obvious alternative (llm_pricing_compare) for raw per-token pricing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.