Skip to main content
Glama

Synthesize Speech

synthesize_speech

Generate speech from input. Consumes usage in the connected project; live usage can be billed. Before generation, use whoami to verify project, environment, scopes, credit and limits. Returns inline MCP audio or an expiring resource_link, never a local file path. Host playback support varies. For integration code only, use get_started.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input": "Your appointment is confirmed.",
      "response_format": "wav"
    },
    "name": "synthesize_speech"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesText to synthesize. Maximum 2000 characters; longer text answers `400 input_too_long` naming the limit and the length you sent. Split longer scripts into several requests.
modelNoDefaults to pyai-speak.
voiceNoVoice id from list_voices. Omit for the account default.
response_formatNoDefaults to mp3.mp3

Output Schema

NameRequiredDescriptionDefault
okYesTrue for success; false for an error. Success requires mime_type and bytes; errors require error and omit audio metadata.
codeYesok on success; a non-ok error code on failure.
dataNoOptional backward-compatible alias: audio metadata on success, or an error object on failure; excludes outcome fields.
bytesNoAudio byte count, not base64 length.
errorNo
docs_urlYesIntegration and error-handling guide.
audio_urlNoExpiring HTTPS download capability. Present with expires_at on the hosted OAuth server; absent for inline-only loopback HTTP.
mime_typeNoMIME type of the audio content.
expires_atNoDownload expiry as Unix milliseconds, not seconds. Does not guarantee access after connection revocation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "input": "Your appointment is confirmed.",
      +    "response_format": "wav"
      +  }
      +]
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare only readOnly=false, idempotent=false, destructive=false, openWorld=false. The description adds materially: generation consumes project credit and live usage can be billed, the return is inline audio or an expiring resource_link and never a local file path, and host playback support varies. These are non-obvious behavioral traits an agent must know before calling.

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?

Five short sentences, front-loaded with the action, then cost, prerequisite, return shape, and a playback caveat. Every sentence carries a distinct operational fact with no repetition of schema content.

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?

Despite an output schema existing, the description still adds value by flagging the expiring resource_link, the absence of a local file, and variable host playback. Cost, prerequisite verification, character limits, and the integration-code alternative are all covered, leaving nothing an agent needs in order to call it correctly.

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 coverage is 100%, and the schema already documents the 2000-character limit with its 400 input_too_long error, the voice id coming from list_voices, and the format enum and defaults. The description adds no parameter meaning beyond that, so the baseline 3 applies. Its useful notes (credit consumption, return shape) are not parameter 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?

States a specific verb and resource ('Generate speech from input') that unambiguously identifies text-to-speech, distinguishing it from siblings like create_dub, create_recap, or create_transcription_job. An agent can select 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?

Explicitly prescribes a prerequisite ('Before generation, use whoami to verify project, environment, scopes, credit and limits') and routes a distinct case elsewhere ('For integration code only, use get_started'). This is exactly the when-to-use and alternative-selection guidance the dimension asks for.

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.