Skip to main content
Glama

MoneyTools x402 agent toolkit

LLM cost calculator

llm_cost_estimate
Read-onlyIdempotent

USD cost of a prompt across 22 popular models (GPT, Claude, Gemini, Grok, DeepSeek, Llama, Mistral) from token counts or raw text, sorted cheapest first. Free: 10 calls/day; then $0.001/call via x402 (MCP params._meta["x402/payment"] or HTTP) or X-API-Key credits. [served by tools.moneytools.dev]

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "llm_cost_estimate"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoor raw prompt text to count
callsNonumber of calls
modelsNocomma list (default all)
inputTokensNoinput tokens (default 1000)
outputTokensNooutput tokens (default 500)

Output Schema

NameRequiredDescriptionDefault

No arguments

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 readOnlyHint and idempotentHint, but the description adds material context the annotations do not: a rate limit (10 free calls/day), a per-call price ($0.001), and the accepted payment channels (x402 via params._meta or HTTP, or X-API-Key credits). The remaining gap is precedence when both 'text' and 'inputTokens' are supplied, which is left unstated.

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?

Three sentences, front-loaded with the core function before pricing details, and no duplicated schema content. The payment sentence is dense, packing three mechanisms into one clause, but it still carries necessary information rather than filler.

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 an output schema present, return values need not be explained, and all five optional parameters are documented at 100% coverage. Completeness is strong for a read-only estimator; the only meaningful omission is how conflicting or combined inputs (text plus token counts, calls multiplier) interact.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents each parameter; the baseline would be 3. The description nonetheless adds meaning by framing 'text' versus token counts as the two alternative input modes and by naming the 22-model provider scope that the 'models' parameter filters against.

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 ('USD cost of a prompt'), names the model coverage (22 models across GPT, Claude, Gemini, Grok, DeepSeek, Llama, Mistral), and states the two input modes (token counts or raw text). It is immediately distinguishable from unrelated siblings like currency_convert, and adds that results are sorted cheapest first.

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 implied rather than stated: the agent can infer this is for pricing a prompt before spending, and the free-tier/payment rules tell it the cost of calling. However, there is no explicit when-to-use/when-not-to-use statement or named alternative, and no guidance on which input mode (text vs. inputTokens) to prefer.

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