Skip to main content
Glama

Generate AI audio

generate_audio
Destructive

Generate one music or speech/voice request and render it in the generation widget. This tool accepts one request: text for speech and sound effects, prompt for a song in Quick mode, music_style and title for one in Lyrics mode. DEFAULT speech model: elevenlabs-tts-v4 — use it unless the user explicitly asks for a different engine. To use a specific named engine instead, set model:'elevenlabs-tts-v2' and pass voice. Get voice ids from list_voices; use list_models(type:'audio') to inspect each model's params. When the catalog exposes suno-v6, use it for music. For sound effects use elevenlabs-sfx with text and duration in seconds. estimate_only:true preflights tokens without submitting. Submitted audio requests can send text to external audio model providers through aicut and consume tokens. On a transport timeout the submission outcome may be unknown: do not automatically resubmit. Reuse returned job IDs and retry only after the original outcome is known. SPENDS TOKENS: price with estimate_only: true, state the price in the same message as your ask, wait for a go naming THIS purchase (SPENDING RULES: get_recipe spending-rules).

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": "generate_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
loopNoSound effects: loop seamlessly.
textNoSpeech: the exact words to speak. Sound effect: a description of the sound.
modelYesAudio model ID from the model catalog (required). Use list_models(type:'audio') to discover.
speedNoSpeech, `elevenlabs-tts-v2` only: speaking rate, 1 is normal.
styleNoSpeech, `elevenlabs-tts-v2` only: how far the speaker's own style is exaggerated.
titleNoSong: the title (required in Lyrics mode).
voiceNoFor speech models: the voice id.
lyricsNoSong, Lyrics mode: words to sing; omit to have them written; '[Instrumental]' for no singing.
promptNoText prompt for the generated audio.
durationNoDuration in seconds. Follow the model catalog: Suno takes `duration_seconds` instead (Lyrics mode). Omit for models without a duration parameter.
stabilityNoSpeech: how steady the delivery is (lower more expressive, higher flatter).
custom_modeNoSong: true = Lyrics mode (needs `title`; takes `lyrics`, `vocal_gender`, `duration_seconds`); omit = Quick (needs `prompt`).
music_styleNoSong, required: genre, mood, instruments.
vocal_genderNoSong, Lyrics mode: singer voice (a preference).
estimate_onlyNoIf true, return the cost in tokens for this generation without submitting any job. Use to preflight cost before generating.
studio_run_idNoThe open studio run's `run_id`; null = outside it; covered only under its run ticket, else its own priced ask.
idempotency_keyNoRetry key (IDEMPOTENCY).
duration_secondsNoSong, Lyrics mode: whole seconds.
prompt_influenceNoSound effects: how literally to follow the text (the model's `min`/`max`).
similarity_boostNoSpeech, `elevenlabs-tts-v2` and `-v4` only: how closely the delivery sticks to the voice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • changedInput schema / properties / duration / description
      Previous value: -"Sound-effect length in seconds within the model's `min`/`max`; billed per second. An omitted length is quoted at a fallback price. Only if the user asked; never to save tokens, never carried over."New value: +"Duration in seconds. Follow the model catalog: Suno takes `duration_seconds` instead (Lyrics mode). Omit for models without a duration parameter."
    • changedInput schema / properties / duration_seconds / description
      Previous value: -"Song, Lyrics mode: whole seconds. Result only."New value: +"Song, Lyrics mode: whole seconds."
    • changedInput schema / properties / estimate_only / description
      Previous value: -"Price only; creates nothing. The only accurate audio quote."New value: +"If true, return the cost in tokens for this generation without submitting any job. Use to preflight cost before generating."
    • changedInput schema / properties / loop / description
      Previous value: -"Sound effects: loop seamlessly. Result only, not price."New value: +"Sound effects: loop seamlessly."
    • changedInput schema / properties / model / description
      Previous value: -"Model id exactly as `list_models` returns it (`elevenlabs-tts-v2` speech, `suno-v6` music and songs, `elevenlabs-sfx` sound effect); it decides which other arguments apply. Use the one the user asked for."New value: +"Audio model ID from the model catalog (required). Use list_models(type:'audio') to discover."
    • changedInput schema / properties / prompt / description
      Previous value: -"Music or song: the Quick-mode idea."New value: +"Text prompt for the generated audio."
    • changedInput schema / properties / prompt_influence / description
      Previous value: -"Sound effects: how literally to follow the text (the model's `min`/`max`). Result only, not price."New value: +"Sound effects: how literally to follow the text (the model's `min`/`max`)."
    • changedInput schema / properties / similarity_boost / description
      Previous value: -"Speech, `elevenlabs-tts-v2` and `-v4` only: how closely the delivery sticks to the voice. Result only."New value: +"Speech, `elevenlabs-tts-v2` and `-v4` only: how closely the delivery sticks to the voice."
    • changedInput schema / properties / speed / description
      Previous value: -"Speech, `elevenlabs-tts-v2` only: speaking rate, 1 is normal. Result only."New value: +"Speech, `elevenlabs-tts-v2` only: speaking rate, 1 is normal."
    • changedInput schema / properties / stability / description
      Previous value: -"Speech: how steady the delivery is (lower more expressive, higher flatter). Result only, not price."New value: +"Speech: how steady the delivery is (lower more expressive, higher flatter)."
    • changedInput schema / properties / style / description
      Previous value: -"Speech, `elevenlabs-tts-v2` only: how far the speaker's own style is exaggerated. Result only."New value: +"Speech, `elevenlabs-tts-v2` only: how far the speaker's own style is exaggerated."
    • changedInput schema / properties / text / description
      Previous value: -"Speech: the exact words to speak (priced PER CHARACTER: never padded or shortened to change the price). Sound effect: a description of the sound. Only if the user asked; never to save tokens, never carried over."New value: +"Speech: the exact words to speak. Sound effect: a description of the sound."
    • changedInput schema / properties / voice / description
      Previous value: -"Required by speech models. Get it from `list_voices` with `provider: 'elevenlabs', usable_for: 'audio', limit: 100` (21 stock voices; without `limit` you see 20 and cannot tell). The user picks it from `preview_url` links BEFORE this call, unless a recipe's own voice table picks it. Never invent one: it fails AFTER the job exists and is charged. Cloned and custom voices work on `generate_fake_text_video` and `generate_image_story`, not here."New value: +"For speech models: the voice id."
  2. Changed1 schema field changed
    • changedInput schema / properties / studio_run_id / description
      Previous value: -"Explainer Studio: the run's `run_id`; null = a take outside the run, not covered by its ticket: price it and ask."New value: +"The open studio run's `run_id`; null = outside it; covered only under its run ticket, else its own priced ask."
  3. Changed2 schema fields changed
    • changedInput schema / properties / studio_run_id / description
      Previous value: -"Explainer Studio: the run's `run_id`. A take without it is not covered by the run ticket: price it and ask."New value: +"Explainer Studio: the run's `run_id`; null = a take outside the run, not covered by its ticket: price it and ask."
    • changedInput schema / properties / studio_run_id / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  4. Changed2 schema fields changed
    • addedInput schema / properties / studio_run_id
      Added value: +{
      +  "description": "Explainer Studio: the run's `run_id`. A take without it is not covered by the run ticket: price it and ask.",
      +  "type": "string"
      +}
    • changedInput schema / properties / voice / description
      Previous value: -"Required by speech models. Get it from `list_voices` with `provider: 'elevenlabs', usable_for: 'audio', limit: 100` (21 stock voices; without `limit` you see 20 and cannot tell). The user picks it from `preview_url` links BEFORE this call. Never invent one: it fails AFTER the job exists and is charged. Cloned and custom voices work on `generate_fake_text_video` and `generate_image_story`, not here."New value: +"Required by speech models. Get it from `list_voices` with `provider: 'elevenlabs', usable_for: 'audio', limit: 100` (21 stock voices; without `limit` you see 20 and cannot tell). The user picks it from `preview_url` links BEFORE this call, unless a recipe's own voice table picks it. Never invent one: it fails AFTER the job exists and is charged. Cloned and custom voices work on `generate_fake_text_video` and `generate_image_story`, not here."
  5. Changed5 schema fields changed
    • removedInput schema / properties / force_instrumental
      Removed value: -{
      -  "description": "Music: no vocals. Result only, not price.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / length_ms
      Removed value: -{
      -  "description": "Music length in whole milliseconds within the model's `min`/`max`; billed per started minute. An omitted length is quoted at a fallback price. Only if the user asked; never to save tokens, never carried over.",
      -  "type": "number"
      -}
    • changedInput schema / properties / lyrics / description
      Previous value: -"Song, Lyrics mode: words to sing; omit to have them written."New value: +"Song, Lyrics mode: words to sing; omit to have them written; '[Instrumental]' for no singing."
    • changedInput schema / properties / model / description
      Previous value: -"Model id exactly as `list_models` returns it (`elevenlabs-tts-v2` speech, `elevenlabs-music` music, `suno-v6` song, `elevenlabs-sfx` sound effect); it decides which other arguments apply. Use the one the user asked for."New value: +"Model id exactly as `list_models` returns it (`elevenlabs-tts-v2` speech, `suno-v6` music and songs, `elevenlabs-sfx` sound effect); it decides which other arguments apply. Use the one the user asked for."
    • changedInput schema / properties / prompt / description
      Previous value: -"Music: the track (mood, instruments, tempo). Song: the Quick-mode idea."New value: +"Music or song: the Quick-mode idea."
  6. Changed1 schema field changed
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Retry-safety key (IDEMPOTENCY)."New value: +"Retry key (IDEMPOTENCY)."
  7. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructive/openWorld true, idempotent false), the description discloses that submitted requests send text to external providers through aicut and consume tokens, that a transport timeout leaves the outcome unknown, and that returned job IDs must be reused rather than triggering a blind resubmit. The `estimate_only:true` preflight and the requirement to state price and wait for an explicit go are concrete behavioral constraints an agent could not infer from annotations alone.

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?

The purpose and mode breakdown are front-loaded and the section is dense but organized by task (mode, model choice, cost, failure handling). Some duplication exists—estimate_only is described once as a preflight and again in the SPENDS TOKENS clause—and the trailing spending-rules pointer is somewhat tacked on, though it earns its place for a token-spending tool.

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?

For a 20-parameter, multi-modal, token-spending tool with no output schema, the definition covers mode selection, defaults, cost preflight, and timeout semantics thoroughly. What it omits is what the caller receives (job id shape, widget URL) and how to retrieve or poll the resulting audio, which matters given siblings like get_audio/list_audio are never referenced.

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 baseline is 3, but the description adds genuinely cross-parameter meaning: which fields compose each mode (text vs prompt vs music_style/title/lyrics), the placement of duration in seconds versus Suno's duration_seconds in Lyrics mode, and where voice ids come from. It stops short of explaining the interaction of style/stability/similarity_boost beyond naming the v2/v4 restriction, leaving some semantic gaps to the schema.

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 definition opens with a specific verb and resource: 'Generate one music or speech/voice request and render it in the generation widget.' It then enumerates the mutually exclusive request shapes (text for speech/SFX, prompt for Quick-mode songs, music_style+title for Lyrics mode), so an agent can tell which parameter set applies without opening the 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?

Explicit guidance is given for model selection ('DEFAULT speech model: elevenlabs-tts-v4 — use it unless the user explicitly asks otherwise', 'When the catalog exposes suno-v6, use it for music', 'For sound effects use elevenlabs-sfx'), including the alternative tools to consult (list_voices for voice ids, list_models(type:'audio') for per-model params). It also states a when-not rule: do not automatically resubmit after a transport timeout.

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.