Skip to main content
Glama

Estimate cost

estimate_cost
Read-onlyIdempotent

Price a generation before starting it: takes the same architecture and config as generate and returns what it would charge in Gems, with the account balance, or the refusal generate would answer, so a config that breaks the model's rules is caught here for free. Nothing is charged or stored. A video input is measured to price it when it is a create_upload url, an earlier result, or a data URL; a video on another host answers requires_media_measurement, since only generate downloads it: upload it with create_upload to price it first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYesA partial config in the model's field names (see get_model's `input_schema`), layered onto the model's defaults: usually `prompt` and the `model_id` of the variant you chose from list_models (left out, the model's `default_model_id` runs), plus fields such as `aspect_ratio`, `resolution`, `duration`, and media inputs as https or data URLs. Mention saved characters and references in `prompt` as `@handle`.
architectureYesThe model id from list_models, for example `mango`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new behavior: nothing is charged or stored, the return payload is the Gems cost plus account balance, and a bad config yields the same refusal generate would give. It also discloses a specific failure mode (a video hosted elsewhere cannot be measured) and why (only generate downloads it).

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?

Purpose, return value, and media caveat are front-loaded in that order, and no sentence is filler. The second sentence is dense and nested (three URL cases, then the exception), which slows reading slightly but every clause carries decision-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 describing the response shape (Gems charge, account balance, or refusal). Combined with the media-measurement precondition, an agent has everything needed to call this correctly and interpret the result, including for the nested config object.

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 both parameters are already documented, including the layered `config` object. The description still adds value by stating that `architecture` and `config` are the same ones generate accepts, which tells the agent it can reuse a config it already validated elsewhere and that estimate and generate will agree.

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?

"Price a generation before starting it" gives a specific verb (price) and resource (a generation), and immediately contrasts with generate by promising the same inputs with no charge. An agent can distinguish this from generate, get_account, and create_upload without opening any schema.

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

Usage Guidelines5/5

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

The description states exactly when to call it (before starting a generation, to catch rule-breaking configs for free) and names the alternative that follows (generate) plus the prerequisite path for external video (create_upload first). The "requires_media_measurement" case tells the agent when this tool cannot answer and what to do instead.

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