Skip to main content
Glama

text_to_speech

Convert text into speech audio using OpenRouter TTS models and save the result as a file. Choose a voice, model, speed, and output format to generate spoken audio.

Instructions

Convert text to speech audio via OpenRouter TTS models (OpenAI, Mistral Voxtral, Fish Audio, Microsoft MAI-Voice). Saves audio file.

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": {
      "input": "<input>"
    },
    "name": "text_to_speech"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesText to convert to speech
modelNoTTS model (default: openai/gpt-4o-mini-tts)
speedNoPlayback speed multiplier (OpenAI models only)
voiceNoVoice ID, e.g. alloy, nova, shimmer, echo, onyx, coral, ash, sage, fable
output_dirNoSave directory (default: ./generated)
response_formatNoAudio format (default: mp3)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does disclose the critical side effect that an audio file is written to disk (default ./generated). It omits what the call returns (file path or URL), whether overwrites occur, auth/API-key requirements, and cost or rate-limit behavior for the paid providers it names.

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 short sentences, both front-loaded with the action and the provider scope, and no filler. Every clause contributes information an agent would otherwise have to infer.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter generative tool with no output schema, the description should say what comes back (a path, a URL, a file object) and where, since 'Saves audio file' is the only return-value hint. It is adequate to invoke the tool but leaves the agent guessing about the result shape.

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?

With 100% schema description coverage, the schema already documents every parameter including defaults and the enum. The description adds only provider enumeration for the model parameter (OpenAI, Mistral Voxtral, Fish Audio, Microsoft MAI-Voice), which is useful but marginal beyond the schema.

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?

States a specific verb and resource ('Convert text to speech audio') plus the generation backend ('OpenRouter TTS models') and the side effect ('Saves audio file'). The resource type alone differentiates it from generate_image and generate_video, though it never names those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no prerequisites, and no pointer to alternatives such as list_tts_models for discovering valid model or voice IDs. The mention of a default model implies other models exist but does not say how to find them.

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