Skip to main content
Glama

Generate speech

generate_speech

Turn text into speech with the selected project key. Unless the user names a model, pick from list_models type=tts featured=true, the curated current ones; a model's params lists voices and formats. The audio is saved to the project's files: the result carries audio.file_id and audio.url, a download link valid for 1 hour. The file stays until it is deleted on the platform's Files page or with DELETE /v3/files/{id}. Normal costs and policy checks apply. Requires runtime:call.

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": {
      "id": "<id>",
      "input": "<input>",
      "model": "<model>",
      "uuid": "<uuid>"
    },
    "name": "generate_speech"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesRuntime API key ID in this project; its secret is never returned
uuidYesProject UUID in the authorized organization
inputYesThe text to speak.
modelYesSpeech model id from list_models type=tts (featured=true for the curated ones).
speedNoSpeaking rate, 1 is normal.
voiceNoA voice the model lists.
formatNoAudio format such as mp3 (default) or wav.
parametersNoProvider settings, forwarded verbatim. Each model lists the keys it takes in params.tts.parameters (list_models detail=full).

Output Schema

NameRequiredDescriptionDefault
idNo
audioNo
modelNo
usageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations it discloses that audio is persisted to the project's files, that the response carries audio.file_id and audio.url with a download link valid for 1 hour, and how the file is later removed (Files page or DELETE /v3/files/{id}). It also flags cost/policy checks and the runtime:call requirement, which are exactly the side effects an agent needs before invoking a non-read-only tool.

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 leads, followed by model selection, output contract, and lifecycle in a logical order with no filler. It is dense and mostly earns its length, though the raw DELETE endpoint reference is a slight detour in an otherwise tight narrative.

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 an 8-parameter, output-schema-backed generation tool with open-world and non-idempotent behavior, the definition covers the prerequisite model lookup, the return artifact and its expiry, persistence lifetime, cost implications, and the required runtime:call scope. Nothing needed to invoke it correctly is left implicit.

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 cross-reference semantics the schema lacks: how to obtain a valid model id (list_models type=tts featured=true) and that a model's params enumerate its legal voices and formats. It still says nothing extra about speed, id, or uuid beyond the schema text.

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?

"Turn text into speech with the selected project key" states a specific verb and resource, and the output destination (project files as audio) is unambiguous. It is distinct from generate_image and generate_video by resource type, and it defers model choice to list_models rather than duplicating that sibling's role.

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?

It gives an actionable routing rule: unless the user names a model, select from list_models type=tts featured=true, and it names how to inspect per-model params for voices/formats. It does not explain when to prefer call_model or the other generate_* siblings, so guidance is strong but not exhaustive.

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.

Resources