Skip to main content
Glama

文本转语音

text_to_speech

Converts up to 300 characters of text into playable WAV speech and returns a 24-hour public audio URL; use a voice ID from list_voices.

Instructions

把文本合成为可播放的语音,同步返回 audioUrl(自带 exp/sig 的公网直链,可直接播放,默认 24 小时有效)。计费工具(失败不扣)。text ≤ 300 字符(2026-11-09 收敛,付费音色硬限);voice 必须来自 list_voices,不要猜测音色名;format 当前仅支持 wav。engine 可选:默认 standard(免费音色,占日额度,wav 输出);"premium"(仅付费档)用商业音色(如 Cherry)按积分计费、不占日额度,音色以充值页商业音色目录为准。

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": "text_to_speech"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes待合成文本,≤ 300 字符;超过请分段多次调用
speedNo语速,0.5–2.0,默认 1.0(仅 standard)
voiceYes音色 ID,必须来自 list_voices 的返回(premium 引擎不受此限,可用商业音色)
engineNo引擎:默认 standard(免费);premium 需付费档,按积分计费
formatNo音频格式,当前仅 wav

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false), the description discloses return behavior (synchronous audioUrl with exp/sig, 24h expiry), billing semantics (failed calls are not charged), and quota impact (standard consumes daily quota, premium does not). It does not discuss error modes for expired links or retry behavior, so it stops short of the highest mark.

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 return value and its validity window are front-loaded, followed by billing, limits, voice sourcing, format, and engine choice — a logical order with little waste. However, heavy parenthetical stacking and an inline date note make it denser than necessary for a five-parameter tool.

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, and the description compensates by explaining the returned audioUrl, its signed-link nature and 24h validity. Combined with quota and billing behavior for both engines, an agent has everything needed to call this correctly and interpret the result.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3; the description still adds meaning by explaining why text is capped at 300 (a hard paid-voice limit effective 2026-11-09) and by clarifying that premium-engine voices are exempt from the list_voices constraint and follow the recharge-page catalog instead. The speed parameter's standard-only restriction is left to the 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 opening clause states a specific verb and resource: synthesize text into playable speech and synchronously return an audioUrl. It immediately names the concrete output (a public direct link with exp/sig, valid 24h by default), which no sibling tool (list_voices, speech_to_text) offers, so an agent can distinguish it without opening the schema.

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

Usage Guidelines5/5

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

It gives explicit preconditions and routing: voice must come from list_voices and must not be guessed, text over 300 chars must be split into multiple calls, and premium engine is only available on paid tiers (a clear when-not for standard accounts). It also states the standard-vs-premium trade-off (free/daily quota vs credits/no quota), which is exactly the decision an agent must make before calling.

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