Skip to main content
Glama

Estimate generation cost

estimate_media_cost
Read-only

Estimate what a generation will cost in credits before running it. Read-only and free. exact=true means computed from the model's price list; approximate=true means the vendor names the final sum itself (video and music) and the number is a best guess; both false means there is nothing to estimate from — and zero credits does NOT mean free.

Input Schema

NameRequiredDescriptionDefault
textNoThe words to say — speech only, their length drives the price (optional).
tierNoTier to price. Omit to use the default tier of that modality.
paramsNoModel settings, as declared by the vendor for the chosen tier — for example {"aspect_ratio":"16:9","resolution":"720p","duration":"4"}. Call list_ai_tiers to see which keys this tier accepts, their allowed values and defaults. Values are strings. Unknown keys are ignored rather than rejected.
modalityYesWhat is going to be generated: image | video | audio | music | 3d
title_idNoWhich game this is for — a label, optional (see the generate_* tools).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=false), so 'Read-only and free' is largely redundant. However, the description adds real behavioral value the annotations do not: the meaning of exact/approximate results, that video and music estimates come from the vendor's own sum, and the critical warning that zero credits does NOT mean free.

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?

Three sentences, front-loaded with the purpose and the cost caveats, with no filler. Every clause carries either routing information or a non-obvious interpretation rule for the result.

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, so the description must explain the return semantics — and it does, covering the three possible result states and explicitly warning about the zero-credits trap. Combined with the schema's full parameter coverage, an agent has everything needed to call and interpret this tool.

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 description coverage is 100%, so all five input parameters are already documented in the schema, including the pointer to list_ai_tiers for valid params keys. The description adds no input-parameter semantics beyond what the schema states — the exact/approximate flags it discusses are output-side concepts, not schema inputs. Baseline 3 applies.

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 and resource ('Estimate what a generation will cost in credits') and clearly positions itself relative to the generate_* siblings as a pre-flight check rather than an action. An agent can tell immediately this is a cost-query tool, not a generation tool.

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?

Gives clear timing context ('before running it') and reassures the agent it is read-only and free, which lowers the cost of calling it speculatively. It stops short of naming a specific alternative or an explicit when-not-to-use condition, so it is strong context without full alternative routing.

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.