Skip to main content
Glama

Estimate the cost of a chat request

get_price_estimate
Read-onlyIdempotent

Estimate the USDC cost of a chat completion request before paying — free, no payment, no authentication required. Read-only: no state changes and no external calls; the estimate is computed locally from server pricing config, so repeated calls with identical inputs return identical results (idempotent). Use this tool to check the exact price for a given model/mode, messages, and max_tokens before calling the paid chat_completions tool. Provide either mode (auto/eco/premium routing) or model (explicit id, mutually exclusive with mode); one of the two is required — if both are sent, model wins. mode values: auto = cheapest model fitting the context, eco = cheapest available, premium = best model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoSmart routing profile (auto/eco/premium).
modelNoExplicit model id (see list_models / /v1/models). Mutually exclusive with mode.
messagesYesChat messages (text content only).
max_tokensNoMax output tokens to estimate (billed upfront, §4.2).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
amount_usdcNo
input_tokensNo
amount_atomicNo
max_tokens_clampedNo

TDQS

A4.9/5.0
Behavior5/5

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

With annotations already declaring readOnlyHint and idempotentHint, the description still adds new behavioral facts: computed locally from server pricing, zero external calls, no state changes, no payment or auth needed. It even explains the mechanism behind idempotence ('computed locally from server pricing config, so repeated calls with identical inputs return identical results') rather than merely echoing the annotation, plus the 'model wins' precedence rule when both mode and model are sent.

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?

Roughly 150 words but every clause carries information: purpose, cost/auth profile, behavioral guarantees, usage routing, parameter semantics, and enum definitions. Nothing repeats the schema (no type resurfacing of 'string' or 'integer'), and the most decision-relevant fact ('free, no payment') is front-loaded in the first sentence. The structure flows from what → behavior → when to → how-to, which is an optimal order for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

All context dimensions are covered: the output schema captures the exact shape of the returned estimate, annotations capture safety/idempotence, and the description covers scope (USDC, chat completion requests), usage context (before chat_completions), auth, precedence, and mode semantics. The one thing it does not spell out, the rounding/unit details of the estimate, is legitimately delegated to the output schema. Nothing an agent needs to call this correctly or decide to route to it is missing.

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 baseline is 3; the description added — deepens this by defining each mode enum value ('auto = cheapest model fitting the context, eco = cheapest available, premium = best model') which the schema's bare enum enumations (auto/eco/premium) leaves undefined." The mutual-exclusion of model vs mode and the 'two are required; if both are sent, model wins' precedence are spelled out in plain language. It doesn't elaborate on the messages or max_tokens meaning, but those are already well described in the schema.

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?

Opens with a specific verb-plus-resource statement: 'Estimate the USDC cost of a chat completion request before paying.' It also differentiates from both siblings — chat_completions is explicitly the 'paid' execution tool this one precedes, and list_models is referenced as the source of model IDs. No ambiguity about what the tool returns or why it exists.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

States the exact trigger condition: 'Use this tool to check the exact price for a given model/mode, messages, and max_tokens before calling the paid chat_completions tool.' This explicitly positions it as a pre-flight step to the only sibling it competes with, and implies the counter-condition (don't use it when you intend to execute a chat). The 'free, no payment, no authentication' framing reinforces why it's safe to call first.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a clearly distinct responsibility: list_models shows the catalog, get_price_estimate computes a cost, and chat_completions generates text. The free vs paid and read-only vs state-changing boundaries are also clear, so an agent can select the right tool without ambiguity.

Naming Consistency3/5

Two tools follow a clear verb_noun pattern (list_models, get_price_estimate), but chat_completions breaks the pattern as a noun/resource name rather than an action. The naming is readable and snake_case is consistent, but the conventions are mixed.

Tool Count5/5

Three tools is exactly the right scope for this server: list models, estimate cost, and generate chat completions. Each tool earns its place and there is no obvious bloat or redundancy.

Completeness5/5

The server covers the complete workflow: inspect models and prices, get a cost estimate for a request, then pay and generate a completion. There are no apparent dead ends or missing operations for the stated purpose of paid model access through Bridgenode.