Skip to main content
Glama

Estimate the cost of a request

estimate_cost
Read-only

Cost estimate at list price for a model and token counts, in your currency. The bill follows the offer the router actually picks (broker.cost in the chat result).

Input Schema

NameRequiredDescriptionDefault
modelYes
currencyNoISO 4217, default USD
input_tokensNo
output_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover readOnlyHint/openWorldHint, so the bar is lower. The description adds genuinely useful behavioral context: it's a list-price estimate, in the caller's currency, and the actual bill follows the router's chosen offer (broker.cost in the chat result). This warns the agent the estimate can diverge from the real charge.

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?

Two compact sentences, front-loaded with the primary purpose, then the caveat. No filler. Could be slightly more explicit about when to call it, but the structure is efficient.

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

Completeness3/5

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

For a 4-parameter estimation tool with no output schema and sparse schema descriptions, the description is adequate but does not fully explain return format or the token parameters. It covers the key pricing caveat (list vs. actual), which is the most important behavioral note.

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 only 25% (only 'currency' is described in the schema). The description clarifies that a model and token counts are inputs, and that pricing is per-currency, but it does not define input_tokens/output_tokens behavior. It partially compensates for the low schema coverage but leaves gaps.

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+resource: 'Cost estimate ... for a model and token counts.' Clear what it does. Does not explicitly differentiate from siblings like get_balance, but the purpose is distinct enough that an agent can pick it out from the list.

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?

The description implies usage (you estimate cost before/around a chat call) but never says when to use this versus alternatives, nor any prerequisites. No explicit when-not conditions or alternative routing is given.

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