Skip to main content
Glama

list_voices

Discover available text-to-speech voices to select options for speech generation in the Speech MCP Server.

Instructions

List all available voices for text-to-speech

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP server request handler for the 'list_voices' tool. Invokes TTSClient.listVoices() and returns formatted list of voices.
    case "list_voices": {
      const voices = await ttsClient.listVoices();
      return {
        content: [{ 
          type: "text", 
          text: `Available voices:\n${voices.join('\n')}` 
        }],
      };
    }
  • Core logic in TTSClient class that lists and filters high-quality voices from the KokoroTTS instance after ensuring initialization.
    async listVoices(): Promise<KokoroVoice[]> {
      await this.waitForInit();
      if (!this.ttsInstance) {
        throw new Error("TTS model not initialized");
      }
      // @ts-ignore-line
      const allVoices = this.ttsInstance.voices as unknown as {[voice: string]: {overallGrade: string; gender: string}};
      const goodVoices = Object.keys(allVoices)
        .filter((voiceName) => ['A+', 'A', 'A-', 'B+', 'B', 'B-', 'C+'].includes(allVoices[voiceName].overallGrade))
      return goodVoices as unknown as KokoroVoice[];
    }
  • Tool schema definition including name, description, and empty input schema (no parameters required).
    const listVoicesTool: Tool = {
      name: "list_voices",
      description: "List all available voices for text-to-speech",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    };
  • src/index.ts:355-360 (registration)
    Registration of listVoicesTool in the array returned by ListToolsRequest handler, making it discoverable by MCP clients.
    tools: [
      textToSpeechTool,
      textToSpeechWithOptionsTool,
      listVoicesTool,
      getModelStatusTool,
    ],

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hammeiam/koroko-speech-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server