Skip to main content
Glama

Calculate credits

calculate_credits
Read-only

Estimate credits from either a legacy creationParams payload or the same v3 payload used by render_video.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculate_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNo
nameNoProject name, up to 200 characters. Set it here instead of calling `rename_project` afterward. Default: the start of the script or prompt.
audioNoLegacy alias of `music`.
inputNoGeneric content alias used by the public API.
mediaNo
musicNoRecommended for background music: `music: { generateMusic: true }`. Revid generates an original instrumental track from this video's script, so it fits the topic and mood (20 credits per started minute of video). Add `music.generationMusicPrompt` to steer the mood, tempo and instruments. Use `music.trackName` only when the user asks for a specific library track: an agent cannot listen to the library, so a track picked by name rarely fits the video. With music on and no track, file or generated music, the neutral `Presentation` track plays. To make the music quieter or louder, set `music.volume` to `low`, `normal` or `high`, or to an exact level from 0 to 100.
voiceNo
avatarNo
promptNoLegacy alias of `source.prompt`.
renderNo
sourceNo
optionsNo
webhookNo
advancedNo
captionsNo
metadataNo
workflowNo
inputTextNoLegacy alias of `source.text` or `source.url`.
projectIdNo
webhookUrlNo
aspectRatioNoOutput aspect ratio.
inputMediasNoLegacy alias of `media.provided`.
characterIdsNo
creationParamsNoOptional legacy payload for calculate_credits.
customCreationParamsNo

Output Schema

NameRequiredDescriptionDefault
okYes
dataNo
errorNo
methodYes
statusYes
endpointYes
retryAfterSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / music / properties / enableLyricsLipSync / description
      Added value: +"Animate characters lip-syncing the lyrics. Requires media.type ai-video: singer lip-sync is only rendered on AI video, so music-to-video and lyrics-to-video refuse (400) a request turning it on with another media type. Both default to moving-image; song-ad is always AI video. Other workflows ignore this field. Workflows: music-to-video, lyrics-to-video, song-ad. Accepted aliases: options.enableLyricsLipSync, enableLyricsLipSync."
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

The annotations already establish a read-only, non-destructive operation, and "Estimate" usefully signals an approximation rather than a rendering action. The dual payload compatibility adds some behavioral context, but the description does not explicitly confirm that no video or project is created, no credits are consumed, or whether estimates can differ from final charges.

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?

The single sentence is front-loaded with the operation and then efficiently states both supported input forms. There is no filler, and the `render_video` reference carries substantial information in very few words.

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?

The output schema removes the need to document return values, and the annotations cover the basic safety profile, so the concise description is minimally adequate. Nevertheless, for a deeply nested payload with no required top-level parameters and uneven schema documentation, it leaves notable uncertainty about the smallest useful request and the practical distinction between estimating and rendering.

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?

The description adds an important rule beyond the individual fields: callers can supply either legacy `creationParams` or the same v3 payload used by `render_video`. With 25 parameters and only 36% schema description coverage, though, it does not compensate with a minimal viable payload, required workflow-specific choices, or guidance about the principal cost drivers.

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 gives a specific operation and resource: estimating credits for a proposed video payload. It also distinguishes the tool from `render_video` by framing this as an estimate that accepts the renderer's v3 payload, while additionally supporting legacy `creationParams`.

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

Usage Guidelines3/5

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

The two accepted payload styles and the relationship to `render_video` provide useful invocation context. However, the description never explicitly says to use it for pre-render cost checks, nor does it clarify when `render_video` should be called instead or whether estimation is optional.

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