Skip to main content
Glama

Speak text in a cloned voice

createSpeech

Convert text to speech by cloning the voice from an audio sample you provide (voice-cloning text-to-speech). Both text and sample are required; the text is limited to 250 characters and the sample is supplied as a URL or base64 audio that must be at most 15MB, with violations returning HTTP 400. An optional delivery note (at most 50 characters, e.g. "angry, shouting") says how the line is said. The job result is a single audio result containing the URL of an MP3 or WAV file (the URL's extension, .mp3 or .wav, says which). Credits are held when the job is accepted and refunded if it fails or is cancelled. Use this when you have a reference voice sample to clone; use createSpeechPreset to speak with a built-in named preset voice instead, and createVoice to design a brand-new voice from a text description rather than cloning one. Pass an optional request_id to tag the result so you can locate it later via listGenerations (type audio). Async generation job: returns {id, status} - poll getApiJob (job and credit contract: see the server instructions).

Credits: This endpoint consumes 2 credits per call.

Input Schema

NameRequiredDescriptionDefault
requestBodyYesPayload for text-to-speech generation using voice cloning

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / requestBody / properties / delivery
      Added value: +{
      +  "description": "How the line is said, e.g. \"angry, shouting\" or \"whispering, out of breath\" (max 50 characters).",
      +  "maxLength": 50,
      +  "type": "string"
      +}
    • changedInput schema / properties / requestBody / properties / text / description
      Previous value: -"Text to convert to speech (max 1000 characters)."New value: +"Text to convert to speech (max 250 characters)."
    • changedInput schema / properties / requestBody / properties / text / maxLength
      Previous value: -1000New value: +250
  2. Changed2 schema fields changed
    • changedInput schema / properties / requestBody / properties / request_id / description
      Previous value: -"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable with the results endpoint."New value: +"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable as the request_id filter of listGenerations."
    • changedInput schema / properties / requestBody / properties / text / description
      Previous value: -"Text to convert to speech (max 100 words)."New value: +"Text to convert to speech (max 1000 characters)."
  3. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / request_id / description
      Previous value: -"Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint."New value: +"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable with the results endpoint."
  4. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / sample / example
      Previous value: -"<url> OR data:image/png;base64,..."New value: +"<url> OR data:audio/mp3;base64,..."
  5. Changed1 schema field changed
    • addedInput schema / properties / requestBody / properties / request_id
      Added value: +{
      +  "description": "Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint.",
      +  "type": "string"
      +}
  6. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond annotations: input limits (250 chars, 15MB), HTTP 400 on violation, credit hold/refund behavior, async job contract with polling via getApiJob, and result format. The idempotentHint=false is not contradicted — request_id reuse returns the existing job, but the tool is not idempotent without it. Loses a point only because failure modes beyond validation (e.g., cloning quality/rejection reasons) are unaddressed.

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?

Front-loaded with the core action, then constraints, then sibling routing, then async contract — all in one dense paragraph where nearly every sentence carries distinct information. Slightly overpacked; the credit line is repeated in a separate trailing note rather than integrated.

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?

Covers inputs, size/character limits, output artifact and format inference from the URL extension, credit accounting, and the async job lifecycle with the polling tool named. Nothing an agent needs to call this correctly is missing, despite there being no output schema.

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 real value the schema lacks: the 15MB sample ceiling, the URL/base64 duality framing, the meaning of delivery ('how the line is said') with an example, and the cross-tool use of request_id as a listGenerations filter.

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+resource ('Convert text to speech by cloning the voice from an audio sample') and explicitly contrasts with createSpeechPreset (named preset voice) and createVoice (design a new voice). An agent can distinguish this from every nearby sibling 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?

Gives an explicit selection rule: 'Use this when you have a reference voice sample to clone', plus named alternatives and the conditions that favor them (preset voice, designed voice). No inference required.

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.