Skip to main content
Glama

generate a speech preview

speech-previews_create
Destructive

Synthesize a confirmed script with a chosen voice into a standalone speech audio job after verifying project access; check options first because synthesis may be paid.

Instructions

Synthesize a confirmed script in a voice from voices_list into one standalone speech audio job (ElevenLabs), after verifying access to projectId. This is a potentially paid action. Check speech-previews_get-options first. On the free plan (its freeScriptLimit is set) the API refuses speech it estimates at over 20 seconds (160 words a minute) or over 320 characters, and a free lipsync takes at most 15 seconds, so keep a script you will lipsync to about 40 words, and split longer text into several previews; paid plans and credits have no duration limit, only the 5,000-character script limit. Persist idempotencyKey before calling, and after an uncertain response retry only with that same key and identical input; a new key can bill again. A 5xx error with no job id (such as 503 or 504 while the speech provider is unavailable) usually means nothing was created, but a job may have been saved before the response was lost. Either way, wait about a minute and retry with the same key and input: it returns the saved job if there is one and never bills twice. After three such failures, tell the user the speech service is unavailable and stop. Returns the job: status PENDING, PROCESSING, SUCCESS or FAILED, with url and duration filled only on SUCCESS, so poll speech-previews_get by the returned id (jobs_get and jobs_wait do not cover speech jobs). Never create again because attaching the resulting audio failed. An inaccessible project or a malformed idempotencyKey fails before anything is synthesized. Not for lipsyncing a script directly (lipsync_create with script and voiceId), editing words in a video in the original speaker voice (dialogue-previews_create) or translating audio (translation-previews_create). Pass projectIntent=explicit with projectId only for a project the user explicitly chose or one just created for this request, never because its name matches or it is open; default new work to a new project.

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": {
      "projectId": "<projectId>",
      "idempotencyKey": "<idempotencyKey>",
      "script": "<script>",
      "voiceId": "<voiceId>"
    },
    "name": "speech-previews_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYesExact text the user confirmed, spoken as written; up to 5,000 characters.
voiceIdYesVoice id returned by voices_list (premade ElevenLabs voices or this organization's clones). A voice with a restriction cannot synthesize; pick another.
projectIdYesProject the preview is for, from projects_create or projects_list. The tool checks you can access it before synthesizing; pass the same id to speech-previews_get.
stabilityNoVoice consistency from 0 to 1; higher is steadier, lower is more expressive.
projectIntentNoRequired with projectId. Set only for an explicit user project selection/update, or the new project just created for this request. Never infer intent from a matching project name, workflow name or active editor.
idempotencyKeyYesA fresh UUID, persisted before the call and sent as the Idempotency-Key header. After an uncertain response, reuse it with the identical script and voice; only this key deduplicates, so a new key can bill a second synthesis.
similarityBoostNoHow closely to match the selected voice, from 0 to 1.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.2.4
    • changedInput schema / properties / idempotencyKey / description
      Previous value: -"Persist this request identity before synthesis. Reuse it with the identical script and voice after an uncertain response."New value: +"A fresh UUID, persisted before the call and sent as the Idempotency-Key header. After an uncertain response, reuse it with the identical script and voice; only this key deduplicates, so a new key can bill a second synthesis."
    • changedInput schema / properties / projectId / description
      Previous value: -"Project the speech belongs to, from projects_create or projects_list."New value: +"Project the preview is for, from projects_create or projects_list. The tool checks you can access it before synthesizing; pass the same id to speech-previews_get."
    • changedInput schema / properties / script / description
      Previous value: -"Text to speak, up to 5,000 characters."New value: +"Exact text the user confirmed, spoken as written; up to 5,000 characters."
    • changedInput schema / properties / voiceId / description
      Previous value: -"An id returned by voices_list. Restricted voices cannot synthesize."New value: +"Voice id returned by voices_list (premade ElevenLabs voices or this organization's clones). A voice with a restriction cannot synthesize; pick another."
  2. Changed4 schema fields changed
    • addedInput schema / properties / projectId / description
      Added value: +"Project the speech belongs to, from projects_create or projects_list."
    • addedInput schema / properties / script / description
      Added value: +"Text to speak, up to 5,000 characters."
    • addedInput schema / properties / similarityBoost / description
      Added value: +"How closely to match the selected voice, from 0 to 1."
    • addedInput schema / properties / stability / description
      Added value: +"Voice consistency from 0 to 1; higher is steadier, lower is more expressive."
  3. Addedv0.1.5

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only flag it as non-read-only, destructive, open-world and non-idempotent; the description goes far beyond that by disclosing that it is a potentially paid action, the plan-dependent duration/character limits, that an inaccessible project or malformed key fails before synthesis, and the exact retry semantics after an uncertain response or 5xx. It also warns against re-creating because a downstream attach failed, which is precisely the destructive footgun the annotation hints at.

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 and the not-for alternatives are front-loaded, followed by limits, retry semantics and polling guidance. Nearly every sentence carries actionable operational detail, though several are long and dense (the combined free-plan limits and the 5xx retry explanation could be split), and the 'keep a script you will lipsync to about 40 words' aside is slightly tangential.

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?

For a paid, non-idempotent synthesis tool this covers everything an agent needs: prerequisites, cost awareness, plan limits, idempotent retry protocol, failure-count cutoff, and the polling path via speech-previews_get with the note that jobs_get/jobs_wait do not apply. Return statuses are named even though an output schema exists.

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 baseline is 3, but the description adds real meaning beyond the schema: the plan-dependent 20s/320-character and lipsync 15s constraints on script, the need to persist idempotencyKey before calling, and the precise projectIntent rules (never infer from a matching name or an open editor). Remaining parameters (stability, similarityBoost) are left entirely 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?

States a specific verb and resource: synthesize a confirmed script in a voice from voices_list into one standalone speech audio job (ElevenLabs). It also explicitly excludes the adjacent cases by naming lipsync_create, dialogue-previews_create and translation-previews_create, so an agent can route correctly without opening another 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 explicit prerequisites (check speech-previews_get-options first, verify projectId access), explicit exclusions (not for direct lipsync, word editing, or translation, each naming the tool to use instead), and an explicit rule for when to pass projectIntent=explicit versus defaulting to a new project.

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