Skip to main content
Glama

Text to speech

text_to_speech
Read-only

Converts text into natural-sounding WAV or MP3 speech in English, Spanish, French, Chinese, Japanese, or Korean, returning audio as a base64 data URL for voice replies, narration, and accessibility.

Instructions

Turn text into natural-sounding speech (WAV or MP3 audio) in English, Spanish, French, Chinese, Japanese or Korean. Returns the audio as a base64 data URL. Good for voice replies, narration and accessibility. Costs $0.006 per 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": {
      "text": "<text>"
    },
    "name": "text_to_speech"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage: "en" (default), "es", "fr", "zh", "jp", "kr".
textYesWhat to say (up to 3,000 characters).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With readOnlyHint=true already declared, the description still adds real value: the return encoding (base64 data URL) and a per-call price of $0.006. It does not cover latency, rate limits, or voice/style options, but for a stateless read-only conversion the added context is moderate.

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?

Three compact sentences, front-loaded with the core action and capability, followed by return format, use cases, and cost. Nothing is repeated or wasted.

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?

For a two-parameter tool with no output schema, the description supplies the missing return-value information (base64 data URL) and cost. The only shortfall is the unexplained WAV/MP3 distinction with no controlling parameter, leaving the agent unsure which format to expect.

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 coverage is 100%, so both parameters and the language enum are already fully documented; the description only restates the language set. It also mentions 'WAV or MP3' even though no parameter lets the caller choose a format, which adds ambiguity rather than meaning about the parameters.

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 opens with a specific verb and resource ('Turn text into natural-sounding speech') and immediately scopes it by output format (WAV/MP3), supported languages, and returned representation (base64 data URL). There is no TTS sibling to confuse it with, and an agent knows exactly what the tool produces.

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 concrete use contexts ('voice replies, narration and accessibility') but no explicit when-not guidance or alternatives. Given the sibling list contains no competing speech-synthesis tool, the absence of exclusions is a minor gap rather than a real ambiguity.

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