Skip to main content
Glama

将文本转换为语音

text_to_speech

Convert text into spoken audio using a chosen voice, tone, and speed, then return a public audio URL for playback or download.

Instructions

调用 OpenAI 兼容 POST /v1/audio/speech 生成语音,并上传到 Urusai 文件托管服务。传入 instructions 可指定语气、情绪、节奏或风格;未指定 voice 时使用 OAI_TTS_VOICE;未指定 speed 时默认 1.25。成功后仅返回公开音频 URL。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes要转换为语音的文本
speedNo可选,播放速度倍率;默认 1.25
voiceNo可选,目标音色;默认使用 OAI_TTS_VOICE
instructionsNo可选,语气、情绪、节奏、口音或表达方式说明;gpt-4o-mini-tts 支持效果最佳
response_formatNo可选,音频格式;默认 mp3

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and idempotentHint=false, so the safety profile is covered. The description adds genuinely new behavior: the audio is uploaded to an external file host and only a public URL is returned, plus the env-var default for voice. No return-format or failure behavior beyond that, hence a 4.

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?

Three front-loaded sentences covering the call flow, the instructions knob, and the defaults. Mostly earns its place, though the voice/speed defaults slightly duplicate the schema.

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?

With no output schema, the description usefully specifies the return value (仅返回公开音频 URL) and the upload side effect, and annotations cover the mutation safety profile. Complete enough for correct invocation, missing only error/timeout behavior.

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 all five parameters are already documented. The description restates the instructions semantics and the voice/speed defaults already present in the schema, adding little beyond it. Baseline 3 is appropriate.

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 (调用 POST /v1/audio/speech 生成语音) plus the non-obvious side effect of uploading to Urusai hosting. An agent can distinguish this from the sibling list_voices, which merely enumerates voices, without opening either schema.

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

Usage Guidelines3/5

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

Explains how to use instructions (语气、情绪、节奏、风格) and the fallback behavior for voice and speed, which is useful context. However, it never states when to prefer this tool over list_voices or provides any when-not-to-use guidance, so routing is only implied.

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

Install Server

Other Tools