Skip to main content
Glama

estimate_run_cost

Calculate the expected cost of one workload run on a chosen model and compare pricing across all models to find the lowest-cost option for given input and output tokens.

Instructions

Estimate what one run of a workload will cost on a model.

Args: model_id: Model to price the workload on. input_tokens: Expected input tokens for one run. output_tokens: Expected output tokens for one run.

Returns the model's cost plus the same workload priced on every other model in the snapshot, cheapest first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYes
input_tokensYes
output_tokensYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the return behavior — the target model's cost plus every other model's cost, cheapest first — which is genuinely useful. However, it never states that this is a read-only, side-effect-free operation, and it doesn't cover errors or limits.

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?

The core purpose is front-loaded in the first sentence and the Args/Returns split is easy to scan. The Args block partially duplicates schema property names, which is defensible given 0% schema coverage, so little is wasted.

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?

With no output schema, the description properly explains the return payload, and with no annotations it partially covers behavior. Gaps remain: what format model_id takes, what the 'snapshot' refers to, and whether the operation has any side effects.

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 0%, so the description must compensate. The Args section gives meaning to all three parameters, notably scoping the token counts to 'for one run.' This is adequate but thin — no format or example for model_id, and no unit or magnitude guidance.

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?

The description states a specific verb and resource: 'Estimate what one run of a workload will cost on a model.' An agent can distinguish this from budget_status or record_spend. It doesn't explicitly name or contrast with the closest sibling, price_usage, which also deals with cost computation.

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 scenario of use is implied by 'one run of a workload,' but there is no explicit when-to-use or when-not guidance. With siblings like price_usage and compare_models_for_task, the description should route the agent between them but does not.

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