Skip to main content
Glama

Estimate a generation

estimate_cost
Read-onlyIdempotent

Credits one image, video or character would cost, before you start it. For an image, say whether it uses your character or references (the edit version) or nothing (the create version). For a video give the same inputs you will send; this is the most it can cost, and the final charge can be lower. Nothing is charged by estimating.

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

Input Schema

NameRequiredDescriptionDefault
kindYes
modelNoImage or video model; for a character, the character maker model (optional)
qualityNoImages: low, medium or high
endImageNo
withAudioNo
resolutionNo
startImageNoVideos: a start image is given (assumed for models that need one)
aspectRatioNo
extendVideoNo
talkingScriptNoVideos: the line for a talking clip
referenceSoundNo
durationSecondsNoVideos: one of the model durations
referenceImagesNo
referenceVideosNo
withCharacterOrReferencesNoImages: true when the character or reference images are used

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The read-only and idempotent hints are already supplied, so the description only needs to add context. It does that well: it states that estimating charges nothing and that the returned figure is a ceiling that the final charge may fall below. That is exactly the kind of behavioral nuance annotations cannot express.

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 sentences, no filler, and the core purpose plus the no-charge caveat are front-loaded. The parenthetical about the edit versus create version is slightly dense but still earns its place.

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?

There is no output schema, and the description does say the response is a credit figure that acts as an upper bound, which covers the return value well. For a 15-parameter tool, though, too many inputs are left undocumented in both the schema and the description for this to be complete.

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?

With 15 parameters and only 40% schema description coverage, much of the input meaning goes unexplained. The description does clarify the withCharacterOrReferences flag for images and stresses that video inputs must mirror the real call, but it leaves model, quality, resolution, durationSeconds, the reference counters and the extend/talking flags to inference.

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 first sentence names a specific resource and verb: the credits an image, video or character would cost, calculated before the generation starts. That is enough to separate it from sibling tools that list models or jobs. It stops short of naming any sibling, so the boundary is clear but not explicitly drawn.

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 description gives concrete conditions for use: call it before you start a generation, pass the same inputs you would send, and it will return an upper bound. It also splits guidance by kind (image versus video). It does not say when estimating is unnecessary or point to a related tool such as a balance check.

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