Skip to main content
Glama

TokenLedger: Live LLM Pricing & Agent Cost Calculator

estimate_agent_cost

Estimate daily, monthly, and annual USD spend plus prompt cache savings for an AI workload.

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": {
      "requests_per_day": "<requests_per_day>",
      "input_tokens": "<input_tokens>",
      "output_tokens": "<output_tokens>"
    },
    "name": "estimate_agent_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
model_slugsNoOptional list of model slugs/IDs; defaults to top 10 paid models
input_tokensYes
output_tokensYes
cache_hit_rateNoFraction between 0 and 1 (default 0.75)
requests_per_dayYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the return content (three time horizons plus cache savings), and "estimate" implies a side-effect-free calculation, but it never states that this is a non-mutating pure computation, whether results are cached or persisted, or how multiple model_slugs are aggregated.

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 well-formed sentence with the output set front-loaded and no filler. It is efficient, though its brevity is partly the source of the parameter ambiguity noted above.

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 five-parameter estimator with no output schema and no annotations, the definition covers what is returned but not the semantics needed to call it correctly. There is no output schema, so the description's output summary is welcome, but the per-request token assumption and multi-model behavior are unaddressed gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 40%, so the description needs to compensate and largely does not. It never clarifies that input_tokens/output_tokens are per-request figures (a critical ambiguity for a cost calculation) or what happens when several model_slugs are supplied; only the cache dimension is loosely echoed via "cache savings".

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 pairs a specific verb ("Estimate") with concrete outputs (daily, monthly, annual USD spend plus prompt cache savings), so the agent knows exactly what the tool computes. It does not, however, distinguish this from pricing siblings such as compare_llm_pricing, leaving the boundary to inference.

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 scope "for an AI workload" implies the use case (budgeting/forecasting for a given traffic and token profile), but there is no explicit when-to-use or when-not-to-use statement and no named alternative. The agent must infer that this is a calculator rather than a lookup and choose against compare_llm_pricing on its own.

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