Skip to main content
Glama

AgentTools Hub

LLM API Cost Calculator

dev_llm_cost_calculator

Calculate the API cost of an LLM call: input and output tokens × published per-million prices for 15 current models (OpenAI, Anthropic, Google, DeepSeek, xAI, Meta). Batch multiplier included for monthly estimates. — x402 price $0.001/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callsYesNumber of calls
modelYesModel
inputTokensYesInput tokens
outputTokensYesOutput tokens

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose meaningful traits: pricing derived from published per-million rates, automatic batch multiplier for volume estimates, model coverage scope, and the x402 payment terms ($0.001/call, USDC on eip155:8453). It still omits how current the price table is and any freshness/rate-limit caveats, but the paid-call disclosure is above baseline.

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?

Three compact fragments with no filler, and the core purpose is front-loaded ahead of the pricing/payment details. Every clause adds information an agent can act on.

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 4-parameter, no-output-schema calculation tool, the description covers what it computes, which models are supported (enum also in schema), and the cost of invoking it. Missing only output-shape/currency expectations and price-table freshness, which are minor for this tool class.

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% and all four parameters are documented there, so the baseline is 3. The description adds the pricing formula concept (tokens × per-million price) and the batch-multiplier behavior, but not per-parameter meaning beyond what the schema already states.

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?

The description states a specific verb and resource — converting input/output token counts into LLM API cost — plus the concrete pricing basis (published per-million prices across 15 named providers). This is enough to distinguish it from the nearest sibling dev_token_estimator (which counts tokens) and from the other *_calculator tools.

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?

Use context is only implied: the mention of a batch multiplier for 'monthly estimates' suggests a projection use case, but there is no explicit when-to-use or when-not-to-use guidance and no pointer to the complementary token-estimation tool. Adequate but leaves routing inference to the agent.

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