Skip to main content
Glama

Price real token usage at every seller

estimate_bill
Read-onlyIdempotent

Price the user's REAL token usage (totals per model, e.g. per month) at every seller of the same model: what it costs at the official list price, at the cheapest verified seller, and the saving. Send totals only, never prompts or keys. Model names must match a model on easiapiai.com (a date suffix like -20250805 is ignored); unknown names come back with suggestions. To get the totals in Claude Code, sum message.usage of the assistant lines in ~/.claude/projects/**/*.jsonl per message.model (see easiapiai.com/bill).

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": {
      "usage": "<usage>"
    },
    "name": "estimate_bill"
  }
}

Input Schema

NameRequiredDescriptionDefault
usageYes
current_sellerNoOptional: who the user pays today, e.g. 'Anthropic'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world. The description adds meaningful behavior beyond that: a privacy constraint (send totals, never prompts or keys), the date-suffix normalization rule, and the unknown-model fallback returning suggestions.

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?

Front-loaded with the core action, then constraints, then the practical how-to. Dense and mostly waste-free, though the embedded Claude Code instructions are lengthy enough to slightly dilute the primary purpose.

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?

With no output schema, the description must convey results, and it does: costs at list and cheapest seller, the saving, and suggestions for unknown models. Combined with the privacy and matching rules, an agent has enough to call it correctly.

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 50%, so the description must carry weight. It explains the model-name matching rule and the notion of per-model/per-month totals, but says nothing about current_seller or the individual token-type fields (cache write, 1h cache, etc.). Baseline 3 is appropriate.

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 and resource — price the user's real token usage — and enumerates the exact outputs (official list price, cheapest verified seller, saving). This clearly separates it from siblings like estimate_cost and get_model_prices.

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?

Gives real context: send totals only, model names must match easiapiai.com, unknown names return suggestions, and one concrete recipe for gathering totals in Claude Code. It doesn't explicitly state when to prefer this over estimate_cost, so it stops short of a 5.

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