Skip to main content
Glama

文本转语音

text_to_speech

把文本合成为可播放的语音,同步返回 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

Output Schema

NameRequiredDescriptionDefault
audioUrlNo
requestIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (which only say non-read-only, non-idempotent, open-world), the description discloses billing behavior (failures are not charged), quota consumption differences between standard and premium, the 24-hour URL expiry, the hard 300-character cap, and that only wav is supported. That is exactly the kind of cost and side-effect context an agent needs before invoking a metered synthesis tool.

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 structure is well front-loaded: what it does and what it returns, then constraints, then engine trade-offs. It is dense but nearly every clause carries operational meaning; minor overlap with the schema on the 300-character limit and wav-only format is the only waste.

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 synchronous, metered generation tool with a full schema and an output schema already covering return values, the definition covers prerequisites, cost model, and limits thoroughly. It stops short of covering latency/timeout expectations for synchronous synthesis or rate-limit behavior, which are the only realistic remaining gaps.

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 100%, so the baseline is 3; the description goes beyond it by explaining that premium voices are exempt from the list_voices requirement and come from the recharge-page commercial catalog, and that premium usage is credit-billed and does not count against the daily quota. The rest (text limit, wav-only, speed for standard) largely restates what the schema already documents.

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+resource ('把文本合成为可播放的语音') and immediately specifies what is returned (a public audioUrl with exp/sig, 24h validity). This makes it unambiguously distinct from the sibling speech_to_text direction and tells the agent the output is directly playable.

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 states clear preconditions and routing: voice must come from list_voices and not be guessed; engine=standard for free voices that consume the daily quota, engine=premium only for paid tiers billed in credits from the commercial voice catalog. There are no explicit 'do not use this for X' exclusions, keeping it just short of a 5.

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