Skip to main content
Glama

Estimate what a request costs

estimate
Read-onlyIdempotent

The cost of a request on every chat model (or the ids given), cheapest first, with the developer's list cost and the saving. Give input_tokens, or a prompt / messages to count from. With the caller's key, prices are the key's own (price locks included). Live from POST /v1/estimate.

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": "estimate"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelsNoModel ids to price. Default: every chat model, cheapest first.
promptNoText to estimate the prompt tokens from, instead of input_tokens.
messagesNoChat messages to estimate from, instead of input_tokens.
input_tokensNoPrompt tokens. Give this or a prompt / messages to count from.
output_tokensNoCompletion tokens. Default 1000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish read-only and idempotent behavior, and the description adds real value on top: pricing reflects the developer's list cost, savings are included, output is ordered cheapest-first, and a caller's key yields its own locked prices. The mention of POST /v1/estimate hints at a live pricing lookup.

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-loads the outcome and ordering before the input requirements and pricing caveats. The style is compressed to the point of being telegraphic, and the closing 'Live from POST /v1/estimate' is of marginal use to an agent, but nothing is padded.

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 carries the burden of describing results, and it does: per-model cost, cheapest-first ordering, list cost, and savings. For a zero-required-parameter read-only tool this is nearly complete, though it omits any note on response size with up to 200 models.

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 100%, so the schema documents all five parameters. The description only restates the input_tokens vs prompt/messages alternative and the model list, adding no format or range detail beyond what the schema already provides.

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: cost of a request on every chat model (or the ids given), cheapest first, returning list cost and savings. Restricting to 'chat model' implicitly separates it from media_quote, but no sibling is named explicitly.

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?

Explains the input choice clearly (give input_tokens, or a prompt/messages to count from) and that key-scoped pricing applies. It never says when to reach for this versus compare, chat, or media_quote, so the usage context is implied rather than stated.

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.