Skip to main content
Glama

LLM API Pricing and Automation Tools by shurco.ai

Estimate an LLM API bill

llm_cost_estimate
Read-onlyIdempotent

Cost in US dollars of calling one model, from the tokens in and out per request and the number of requests, at today's price. Handles cached input tokens and the batch price where the model has one. Use llm_price_lookup first if you are unsure of the model id.

Input Schema

NameRequiredDescriptionDefault
modelYesModel id such as "openai/gpt-6.1-sol-pro", or an exact model name.
requestsNoNumber of requests. Default 1.
input_tokensYesInput tokens per request.
output_tokensYesOutput tokens per request.
use_batch_priceNoUse the batch price if the model has one. Default false.
cached_input_tokensNoHow many of the input tokens are read from the prompt cache. Default 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: pricing is computed at "today's price", and cached input tokens plus the batch price tier are handled where applicable.

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 compact sentences, front-loaded with the core purpose and the output unit (US dollars). The final routing sentence earns its place; nothing is padded, though the middle sentence is slightly redundant with the schema's cached/batch parameters.

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 simple, read-only calculation tool with no output schema, the description is essentially complete — it names the return unit and the input dimensions that drive it. It does not describe rounding, currency assumptions, or error behavior for unknown model ids, which are minor residual gaps.

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%, so the schema already documents all six parameters with defaults (requests=1, use_batch_price=false, cached_input_tokens=0). The description's mention of cached and batch inputs mirrors that schema content rather than adding format or edge-case semantics, so baseline 3 applies.

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 action and resource — computes "cost in US dollars of calling one model" — from clearly identified inputs (tokens in/out per request, request count). It is readily distinguishable from the sibling llm_price_lookup, which returns a unit price rather than a computed bill.

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?

Explicitly routes the agent to llm_price_lookup when the model id is uncertain, which is genuinely useful sequencing guidance. It does not, however, address when to prefer this over llm_cheapest_models or any exclusion conditions, so it stops short of full when/when-not coverage.

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