Skip to main content
Glama

Text To Audio Price

text_to_audio_price

Calculate text-to-audio generation cost from character count, language, and speed before running a job. Validates mode, voice, and instructions so quotes fail where the actual job would.

Instructions

Calculate price for text-to-audio generation.

The price follows the number of characters (text, or count_text), the language and the speed. mode, voice and instruct are only validated, so the quote fails where the job would. Left unset they are taken from the model's card, exactly as text_to_audio does.

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

Input Schema

NameRequiredDescriptionDefault
langNoLanguage code as the model expects it (Kokoro: 'en-us'; Qwen3: 'English'). Defaults to the model's own
modeNoTTS mode: 'custom_voice', 'voice_clone' or 'voice_design'. Leave unset to use the mode the model supports
textYesText for price calculation
modelYesTTS model name (e.g., 'Kokoro')
speedNoSpeech speed. Per model (see 'speed' in the model list; most fix it at 1). Defaults to the model's own
voiceNoVoice name from the model list for the chosen lang (e.g. Kokoro en-us 'af_alloy'). Defaults to the model's default voice for that language
instructNoVoice description or style instruction, as the job will send it. Validated, not priced
count_textNoPrice for this many characters instead of the given text
sample_rateNoSample rate in Hz. Defaults to the model's own
audio_formatNoOutput format. Defaults to the model's own; most models emit mp3 only

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.3

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the behavior burden. It does well on pricing semantics (price follows characters, language, speed) and on validation semantics (mode/voice/instruct are validated, so a quote fails where the job would fail), but says nothing about whether the quote is binding, whether the call itself consumes credits, or any rate/permission constraints.

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 is front-loaded in one sentence, followed by the pricing rule and then the validation caveat. Four tight sentences with no filler; the backticked parameter names read slightly dense but remain scannable.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and all ten parameters are schema-documented. The description fills the main remaining gap (what drives the price and what is merely validated); only the cost/credits and binding nature of the quote are left unaddressed.

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 the schema already documents all ten parameters and the baseline would be 3. The description adds real value by partitioning parameters into priced inputs (text/count_text, lang, speed) versus validate-only inputs (mode, voice, instruct), which the schema does not convey.

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?

States a specific verb and resource: calculate the price for text-to-audio generation, and names text_to_audio as the execution counterpart whose defaults it mirrors. That is enough to separate it from the generation tool, though it does not explicitly contrast itself with the other *_price siblings.

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?

Usage is implied (call this to get a quote before running a job) but never stated as such, and there is no explicit 'use this instead of text_to_audio when...' routing. The note that unset mode/voice/instruct fall back to the model card does give useful pre-call context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.