Skip to main content
Glama

Estimate cost

estimate_cost
Read-only

Credits a generation would cost, without running it. Same arguments as generate. Also validates the arguments and returns the model chosen and output width/height. credits is null when that tier has no price, which means it cannot be submitted; otherwise it is unit_credits x num_outputs. available_credits is the organization's spendable balance. available means the model can run at this tier now; it does not check the balance. The job is refused when credits exceeds available_credits, or when the model is paid_credits_only (see list_capabilities) and the organization has no purchased credits.

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": {
      "capability": "<capability>"
    },
    "name": "estimate_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
lorasNo
modelNo
inputsNo
promptNo
projectNo
qualityNo
capabilityYes
duration_sNo
resolutionNo
num_outputsNo
aspect_ratioNo
output_formatNo
output_qualityNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Far exceeds what readOnlyHint/openWorldHint declare: it explains the null `credits` case (tier unpriceable, cannot be submitted), the pricing formula (`unit_credits` x `num_outputs`), that `available` ignores the balance, and the two refusal conditions. These are exactly the behavioral traits an agent needs to interpret the result and avoid a wasted submission.

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 key claim is front-loaded in the first sentence, and the remaining sentences are dense but mostly earn their place by decoding result fields. It leans on return-value explanation when an output schema already exists, so it is slightly longer than strictly necessary.

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?

For a 13-parameter pre-flight tool with an output schema, the description covers purpose, result interpretation, and failure modes well. The remaining gap is per-parameter guidance, which the 'same arguments as generate' shortcut papers over but does not eliminate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 13 parameters, so the description must carry that burden and largely does not. Delegating to 'same arguments as generate' is a partial help, and `num_outputs` is given price semantics, but loras, inputs, prompt, project, quality, duration_s, resolution, aspect_ratio, output_format and output_quality carry no meaning from the description.

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?

States a specific verb+resource ('credits a generation would cost, without running it') and explicitly distinguishes itself from the sibling it shares arguments with ('Same arguments as generate'). An agent can tell immediately that this is a dry-run cost check rather than a generation.

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

Usage Guidelines4/5

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

The 'without running it' framing plus the refusal conditions make the use case (pre-flight validation before submitting a job) clear, and it points to list_capabilities for paid_credits_only status. However, it never explicitly says when *not* to use it or that the same argument set means you can swap in generate once approved, so a small inference is left.

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