Skip to main content
Glama

Synthesise speech to an MP3 file

speak

Synthesizes text into an MP3 using a selected provider voice, returning the audio, file path, duration, character count, and estimated list-price cost.

Instructions

Synthesises text with a Telnyx voice and writes an MP3 file. Returns the absolute file path, byte size, measured duration, character count and the estimated list-price cost, plus the MP3 itself as an audio block (up to 8 MB, unless TELNYX_TTS_EMBED_AUDIO=false).

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": {
      "text": "<text>",
      "voice": "<voice>"
    },
    "name": "speak"
  }
}

Input Schema

NameRequiredDescriptionDefault
rateNoSpeaking rate multiplier (1 = normal). Mapped per provider: voice_speed for Telnyx Ultra/Grok, speed for Minimax/Soniox, SSML <prosody rate> for AWS Polly and Azure. Other providers reject it.
textYesText to synthesise. Markdown is stripped by Telnyx.
voiceYesVoice id in Provider.Model.VoiceId format, e.g. "Telnyx.Ultra.Clara" or "aws.Polly.Vicki".
languageNoBCP-47 language code, e.g. "de-DE". Used by AWS Polly, Azure, ElevenLabs, Inworld and Soniox; ignored by other providers.
file_nameNoBase name for the MP3 inside the output directory. Sanitised; no paths allowed.
text_typeNoSet "ssml" to send your own SSML. Only AWS Polly and Azure support it.
voice_settingsNoProvider-specific tuning.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true and destructiveHint=false, so the write nature is partly covered. The description goes further by disclosing the concrete side effect (an MP3 written to disk), the exact return payload, the 8 MB audio-block cap, and the TELNYX_TTS_EMBED_AUDIO=false escape hatch. Remaining gaps are failure modes and where the output directory lives.

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?

Two sentences, purpose front-loaded, then the return contract. The long enumeration of returned fields earns its place because there is no output schema. No filler or restatement of the tool name.

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?

With no output schema, the description correctly carries the return contract, including the embed toggle that changes response shape. For a 7-parameter tool with a nested voice_settings object, the parameter surface is fully covered by the schema. It lacks only operational detail such as output directory location and error behaviour.

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

Parameters3/5

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

Schema description coverage is 100%, including per-provider notes on rate, language and text_type, so the schema does the heavy lifting. The description adds only that the voice must be a Telnyx voice, which is a mild narrowing beyond the schema's Provider.Model.VoiceId format. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: synthesise text with a Telnyx voice and write an MP3 file. That is unambiguous and clearly distinct from siblings like list_voices and estimate_cost. It stops short of explicitly contrasting itself with render_script, which is the nearest conceptual neighbour.

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?

Usage is only implied: the agent can infer this is the tool that turns text into audio, but nothing states when to prefer it over render_script or to call list_voices first for a valid voice id. No exclusions or prerequisites are given.

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

Deploy Server

Other Tools