Skip to main content
Glama

SuanLinFang — STT / TTS / OCR / Decision APIs

Synthesize Speech

synthesize_speech

把文本合成为语音(≤3000 UTF-8 字节,约 1000 汉字),同步返回现签下载链接(url,GET 即得音频,1 小时内有效)。 请提醒用户及时下载转存——链接过期后只能重新合成(重复计费)。 更长的文本请改用 submit_speech_task(异步任务)。speaker 音色代码先用 list_tts_voices 查询。 计费约 2 元/万字符,失败不计费。

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

Input Schema

NameRequiredDescriptionDefault
textYes
speakerNodefault
audio_formatNowav

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses synchronous behavior, a 1-hour link validity window, the consequence of expiry (re-synthesis with repeat billing), the billing rate (~2元/万字符) and that failures are not charged. It also tells the agent to warn the user to save the file promptly, which is actionable operational context. Minor gap: it doesn't say whether synthesis is idempotent or how the 3000-byte limit is measured against multibyte text beyond the character approximation.

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?

Front-loads the core capability and size limit, then adds constraints, alternative routing, prerequisite lookup, and pricing in a tight sequence. Every sentence conveys an operational fact; nothing is filler.

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?

For a 3-parameter synchronous generation tool with an output schema, the description covers the limits, the return artifact (url, GET to obtain audio, 1-hour TTL), cost model, and escalation path to the async sibling. An agent has everything needed to call it and to advise the user correctly.

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 description coverage is 0%, so the description must compensate and largely does: it explains the text size limit and the speaker parameter's required lookup flow via list_tts_voices. The third parameter, audio_format, is never mentioned — its wav/mp3 choice and wav default are left entirely to the enum, which is a small but real gap.

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?

States a specific verb+resource (把文本合成为语音) and immediately adds the defining scope constraint (≤3000 UTF-8 bytes, synchronous return of a pre-signed URL). It also explicitly distinguishes itself from the async sibling submit_speech_task, so an agent can route correctly without opening a 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?

Gives explicit routing rules: longer text must go to submit_speech_task, and speaker codes must first be obtained via list_tts_voices. Both the when-to-use and the when-to-use-something-else conditions are named directly.

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