Skip to main content
Glama

dry_run_cost_estimate

Estimate chat completion cost before sending a request by using cached model pricing; returns projected input/output token counts and cost.

Instructions

Estimate the cost of a chat completion without sending it to the API. Uses cached pricing from the model spec card. Returns estimated input/output token counts and cost.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model_or_alias": "<model_or_alias>",
      "messages": "<messages>"
    },
    "name": "dry_run_cost_estimate"
  }
}

Input Schema

NameRequiredDescriptionDefault
messagesYesMessages to estimate cost for
model_or_aliasYesModel ID or alias
max_output_tokensNoAssumed output tokens (default 500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the important behaviors: no API call is made (so no side effects) and pricing comes from a cached model spec card, which hints at possible staleness. However it does not spell out that cached pricing may be out of date or approximate, nor does it mention auth requirements, so the transparency is meaningful but incomplete.

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 short sentences, front-loaded with the differentiating constraint (no API call) and then the data source and return values. The final sentence slightly overlaps the first, but nothing is padded or wasted.

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?

There is no output schema, and the description compensates by naming what comes back (token counts and cost). For a simple, non-mutating three-parameter estimate tool this is nearly enough; only an accuracy or staleness caveat about the cached pricing is missing.

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 model_or_alias, messages, and max_output_tokens are already documented in the schema. The description's mention of "estimated input/output token counts" adds only marginal context, implying messages drives input tokens and max_output_tokens bounds output, which is the appropriate baseline-3 outcome.

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?

"Estimate the cost of a chat completion without sending it to the API" pairs a specific verb and resource with the exact scope boundary that matters here, distinguishing it from navigator_chat by making clear no inference call occurs. An agent can tell what this does and what it does not do without any sibling reference.

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 phrase "without sending it to the API" strongly implies the use case, i.e. a pre-flight cost check before navigator_chat, but the description never states that explicitly nor names any alternative. Usage is inferable rather than declared.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.