Skip to main content
Glama

list_voices

Explore and retrieve all available voice options for text-to-speech and voice cloning services within the MiniMax MCP JS environment. Specify voice types to filter results.

Instructions

List all available voices. Only supported when api_host is https://api.minimax.chat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
voiceTypeNoType of voices to list, values: ["all", "system", "voice_cloning"]all

Implementation Reference

  • Handler function for the 'list_voices' MCP tool. Calls voiceApi.listVoices(params) and returns formatted success or error message.
    async (params) => { try { // No need to update configuration from request parameters in stdio mode const result = await this.voiceApi.listVoices(params); return { content: [ { type: 'text', text: `Success. System voices: ${result.systemVoices.join(', ')}, Cloned voices: ${result.voiceCloneVoices.join(', ')}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Failed to list voices: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } },
  • Registers the 'list_voices' tool with the MCP server, including description, input schema using Zod, and the handler function.
    private registerListVoicesTool(): void { this.server.tool( 'list_voices', 'List all available voices. Only supported when api_host is https://api.minimax.chat.', { voiceType: z .string() .optional() .default('all') .describe('Type of voices to list, values: ["all", "system", "voice_cloning"]'), }, async (params) => { try { // No need to update configuration from request parameters in stdio mode const result = await this.voiceApi.listVoices(params); return { content: [ { type: 'text', text: `Success. System voices: ${result.systemVoices.join(', ')}, Cloned voices: ${result.voiceCloneVoices.join(', ')}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Failed to list voices: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } }, ); }
  • TypeScript interface defining the input parameters for list_voices request.
    export interface ListVoicesRequest { voiceType?: string; }
  • VoiceAPI.listVoices method: Makes API call to MiniMax /v1/get_voice endpoint, processes response, formats voice lists, and returns structured data used by the tool handler.
    async listVoices(request: ListVoicesRequest = {}): Promise<{ systemVoices: string[], voiceCloneVoices: string[] }> { try { // Send request const response = await this.api.post<any>('/v1/get_voice', { voice_type: request.voiceType || 'all' }); // Process response const systemVoices = response?.system_voice || []; const voiceCloneVoices = response?.voice_cloning || []; // Format voice information const systemVoiceList: string[] = []; const voiceCloneVoiceList: string[] = []; for (const voice of systemVoices) { systemVoiceList.push(`Name: ${voice.voice_name}, ID: ${voice.voice_id}`); } for (const voice of voiceCloneVoices) { voiceCloneVoiceList.push(`Name: ${voice.voice_name}, ID: ${voice.voice_id}`); } return { systemVoices: systemVoiceList, voiceCloneVoices: voiceCloneVoiceList }; } catch (error) { throw new MinimaxRequestError(`Failed to list voices: ${String(error)}`); } }

Other Tools

Related Tools

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/MiniMax-AI/MiniMax-MCP-JS'

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