Skip to main content
Glama

Estimate generation cost

estimate_cost
Read-onlyIdempotent

Get the exact credit cost of a generation before running it, plus whether the user's balance and storage can cover it. Does not spend credits. Use list_models for valid model keys.

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

Input Schema

NameRequiredDescriptionDefault
qualityNoImage quality (image operations). Defaults to high.
modelKeyYesModel key from list_models.
operationYesThe kind of generation to price.
resolutionNoVideo resolution (video operations).
durationSecondsNoVideo duration in seconds (video operations).
inputImageCountNoNumber of input images.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, but the description adds a money-specific guarantee ('Does not spend credits') that an agent should not have to infer, plus the fact that the result covers both balance and storage sufficiency. It does not discuss failure modes for unsupported operation/resolution combinations, which keeps it from a 5.

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?

Two sentences, zero filler, with the core guarantee (no credit spend) stated up front and the prerequisite pointer last. Nothing is repeated from the title.

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?

With no output schema, the description correctly summarizes the return payload (cost plus coverage of balance and storage). Six parameters are fully documented in the schema, so little else is required; only the conditional relevance of quality/resolution/durationSeconds per operation goes unstated.

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 the parameter documentation baseline is 3; the description earns above that by telling the agent where valid modelKey values come from ('list_models'). It does not explain the relationship between operation and the operation-specific parameters (quality/resolution/durationSeconds), leaving that to the schema's parenthetical hints.

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?

The description uses a specific verb and resource ('Get the exact credit cost of a generation') and clearly scopes it as pre-flight rather than execution. It is easily distinguished from the generate_/edit_/redo_ siblings because it prices an operation instead of performing it.

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?

'before running it' establishes the call ordering, and 'Use list_models for valid model keys' routes the agent to the prerequisite tool. There is no sibling tool that does the same job, so an explicit alternative is not needed, but it stops short of stating when-not-to-call (e.g. after a generation already exists).

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