Skip to main content
Glama

ai_tts

Synthesize speech from text. Returns audio bytes as base64, or saves to a storage path.

Without model, the free default voice is used — no activation, no bill, nothing to choose.

  • inworld-tts-2-flash (default) — free: 166 English voices by name (default Ashley; e.g. Dennis, Olivia, Duncan). A Kokoro voice id maps to a similar voice. Up to 2,000 chars per call. word_timings: true also returns per-word start/end seconds.

  • hexgrad/Kokoro-82M — free: 28 English voices by id (default af_bella). Up to 8,000 chars.

  • ResembleAI/chatterbox-turbo — free: one built-in voice (omit voice). Up to 8,000 chars.

All are free within fair-use limits; ai_catalog lists every voice. A voice whose provider is down returns VOICE_UNAVAILABLE; nothing is substituted.

Activation required: ai_tts.

Example:

{
  "project_id": "my-saas",
  "voice": "Ashley",
  "text": "Welcome to our app! Let's get started.",
  "storage": "/audio/welcome.mp3"
}
// Returns: { "storage_path": "/audio/welcome.mp3", "size_bytes": 40320, "cost": { "total": "$0.00" } }

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": {
      "project_id": "<project_id>",
      "text": "<text>"
    },
    "name": "ai_tts"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage code (en, es, fr, zh, ja, ko, …). Default en.
textYesText to speak. Default voice: up to 2,000 chars.
modelNoOptional. Omitted: the free default voice (inworld-tts-2-flash). Also hexgrad/Kokoro-82M and ResembleAI/chatterbox-turbo; ai_catalog lists every model that can serve today.
voiceNoVoice name for the chosen model, e.g. Ashley (default), Dennis, Olivia; Kokoro ids like af_bella. Full lists in ai_catalog.
storageNoOptional storage path like /audio/greeting.mp3. When set, saves to the project filesystem.
project_idYesProject ID (UUID), subdomain, or slug — resolved server-side, no UUID lookup needed. 'default' also works when the account has exactly one project; multi-project accounts must name one (the error lists them).
word_timingsNoDefault voice only. true: also return words with start/end seconds, for syncing text to audio.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and openWorldHint=true; the description goes far beyond by disclosing activation requirement, fair-use billing, per-model character caps, that nothing is substituted when a provider is down (VOICE_UNAVAILABLE), and the exact failure mode. It also shows the return payload shape via the example, so the agent knows a storage write may occur.

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 output behavior is front-loaded, then a compact bulleted model table, then a concrete request/response example — good structure with little wasted text. It loses a point because several bullets repeat the input schema nearly verbatim, making the block longer than it needs to be.

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?

There is no output schema, yet the example supplies the return envelope (storage_path, size_bytes, cost). Combined with defaults, character limits, error behavior, and the activation note, an agent has everything needed to call this 7-parameter tool correctly on the first attempt.

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%, so every parameter is already documented where the agent reads it; the description largely restates model options, default voices, and char limits already present in the schema. It adds a small amount of extra meaning (default-voice is free with 'nothing to choose', Kokoro voice-id mapping), but most of the text is duplication rather than new semantics.

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 opening sentence gives a specific verb and resource ('Synthesize speech from text') and immediately states the two output modes (base64 audio bytes or a saved storage path). It is clearly a text-to-speech tool and cannot be confused with siblings like ai_generate_image or ai_complete.

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 lays out a decision table for model selection: omit `model` for the free default, or pick Kokoro-82M / chatterbox-turbo, with per-model char limits and voice-count differences spelled out. It also routes to `ai_catalog` for the full voice list. What it does not do is state when an agent should choose this over any sibling (e.g., ai_generate_image), so it stops short of explicit when/when-not routing.

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