Skip to main content
Glama

estimate_credits

Read-only

Free dry run: validates parameters and returns the exact credit cost without charging. Also reports why a generation would be rejected (subscription required, model offline, too many concurrent jobs, invalid params, daily cap).

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": {
      "model": "<model>"
    },
    "name": "estimate_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoFor song and speech: simple = describe it; custom = write the lyrics / exact script yourself. Not needed for type sound_effect (mode "sound_effect" without type is also accepted).
typeNosong = a song with music; sound_effect = a short sound effect / loop; speech = spoken voice-over / narration with optional background music (not singing). See list_models[].types.song
modelYesModel id from list_models (e.g. "suno", "acestep").
paramsNoParameters for the chosen type + mode: list_models[].params[mode] for songs, list_models[].params.sound_effect for sound effects, list_models[].speech.params[mode] for speech. Unknown keys are rejected.
versionNoVersion id from list_models; omit for the model's default version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / mode / description
      Previous value: -"simple = describe the song; custom = write lyrics/style yourself; sound_effect = a short sound effect / loop instead of a song. See list_models[].modes."New value: +"For song and speech: simple = describe it; custom = write the lyrics / exact script yourself. Not needed for type sound_effect (mode \"sound_effect\" without type is also accepted)."
    • changedInput schema / properties / params / description
      Previous value: -"Mode-specific parameters; schema in list_models[].params[mode]. Unknown keys are rejected."New value: +"Parameters for the chosen type + mode: list_models[].params[mode] for songs, list_models[].params.sound_effect for sound effects, list_models[].speech.params[mode] for speech. Unknown keys are rejected."
    • addedInput schema / properties / type
      Added value: +{
      +  "default": "song",
      +  "description": "song = a song with music; sound_effect = a short sound effect / loop; speech = spoken voice-over / narration with optional background music (not singing). See list_models[].types.",
      +  "enum": [
      +    "song",
      +    "sound_effect",
      +    "speech"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "model",
      -  "mode"
      -]New value: +[
      +  "model"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds real value by confirming no credits are charged and by enumerating the specific failure conditions surfaced (subscription required, model offline, concurrent job limit, invalid params, daily cap). What's still absent is the shape of a successful response, but the failure taxonomy is unusually informative.

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 waste, with the most decision-relevant fact ('Free dry run') front-loaded. The parenthetical failure list is compact and scannable rather than padded prose.

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?

With no output schema, the description must describe returns and it does: exact credit cost plus rejection reasons. Combined with a fully documented nested schema and readOnly annotation, an agent has everything needed to call this correctly.

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% with five well-documented parameters including enums for mode and type, so the schema already carries the burden. The description mentions 'invalid params' as a rejection cause but adds no semantics of its own about model, version, or the nested params object — 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 — 'validates parameters and returns the exact credit cost' — with the crucial qualifier 'Free dry run... without charging,' which separates it from generate_music. The second sentence adds the diagnostic purpose, so an agent knows exactly what this tool produces.

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 'free dry run' framing makes the use case (pre-flight check before a paid generation) clear, and the rejection-reason reporting further implies it should be called before committing credits. It stops short of explicitly naming generate_music as the follow-up or stating when not to bother calling it.

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.