Skip to main content
Glama

text_to_speech

Convert text to speech and save audio to a file. Customize voice, model, and output format for realistic speech synthesis.

Instructions

Convert text to speech and save the audio to a file.

Args: text: The text to synthesize. voice_id: ElevenLabs voice id (defaults to the configured default voice). model_id: TTS model id (default "eleven_multilingual_v2"). Other options include "eleven_flash_v2_5" (fast/cheap) and "eleven_turbo_v2_5". output_format: e.g. "mp3_44100_128", "mp3_44100_192", "pcm_44100", "wav_44100". language_code: ISO code to enforce a language (supported by some models). stability / similarity_boost / style / speed: voice setting overrides (0..1; speed ~0.7..1.2). use_speaker_boost: bool. seed: deterministic generation seed. output_filename: optional file name (extension inferred if omitted).

Returns the absolute path of the saved audio file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
textYes
speedNo
styleNo
model_idNo
voice_idNo
stabilityNo
language_codeNo
output_formatNomp3_44100_128
output_filenameNo
similarity_boostNo
use_speaker_boostNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool saves audio to a file and returns the absolute path, lists parameters and their effects (model options, voice settings, seed for determinism, output format). It does not mention overwrite behavior or permission requirements, but overall it provides substantial behavioral context beyond a minimal statement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured as a standard docstring with 'Args:' and 'Returns:', making it easy to scan. It is front-loaded with the main purpose. Despite covering many parameters, every sentence adds value without redundancy. It is appropriately concise for the complexity.

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?

Given the 12 parameters, no annotations, and presence of an output schema (return path), the description covers all necessary aspects: parameter details, defaults, options, and return value. It leaves no critical gaps for typical TTS usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does so excellently: for each parameter (12 total), it provides type hints, default values, examples (e.g., model_id: 'eleven_multilingual_v2', output_format: 'mp3_44100_128'), and value ranges (e.g., speed: 0.7-1.2). This adds significant meaning beyond the bare 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 description begins with a clear action: 'Convert text to speech and save the audio to a file.' This explicitly states the verb ('convert', 'save') and the resource ('text to speech'). It distinguishes the tool from siblings like speech_to_speech or text_to_dialogue by focusing on direct text-to-speech conversion with file output.

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?

The description does not explicitly state when to use this tool versus alternatives (e.g., speech_to_speech, text_to_dialogue). The usage is implied by the tool's name and description ('convert text to speech'), but no direct guidance on when to choose it over other audio tools or mention of exclusions is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/neomorrison/elevenlabs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server