Skip to main content
Glama

LLM cost calculator

ai_cost
Read-onlyIdempotent

Cost per call and for N calls of a workload on each listed model: items[] {id, usd_per_call, usd_total, fits_context}, cheapest. $0.002/call. Use to estimate what a workload costs on several LLMs before choosing one.

Input Schema

NameRequiredDescriptionDefault
callsNo
modelsNocomma-separated ids, e.g. openai/gpt-5,anthropic/claude-sonnet
input_tokensNo
output_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, and the description adds real value on top by describing the return payload (per-item fields plus a cheapest field) that no output schema provides. It gives a sample cost ("$0.002/call"), though it doesn't state whether models outside the list error out or are skipped.

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 return shape and squeezed into a few dense sentences with no filler. The telegraphic style ("items[] {id, usd_per_call...}") is efficient, if slightly cryptic on first read.

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?

With no output schema, the description does the work of explaining the return shape, which is a genuine strength. However, for a 4-parameter tool with only 25% schema coverage it leaves the token-definition parameters unexplained, so an agent cannot confidently construct a workload.

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?

Only 'models' is covered by the schema description; the 25% coverage leaves calls, input_tokens, and output_tokens undocumented. The description gestures at N calls and 'workload' but never explains that workload is defined by input_tokens/output_tokens, or what happens if they are omitted, so it does not compensate for the gap.

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?

States a specific verb and resource: computes cost per call and for N calls across a listed set of models, and returns items[] with id, usd_per_call, usd_total, fits_context, plus cheapest. It does not differentiate itself from the ai_cheapest or ai_models siblings, which keeps it off 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 Guidelines4/5

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

"Use to estimate what a workload costs on several LLMs before choosing one" gives a clear use context and timing. It names no exclusions and doesn't point to ai_cheapest or ai_models as alternatives, so the routing guidance is incomplete.

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.