get_all_voices
Retrieve a paginated list of available voices for text-to-speech and voice conversion tasks, with configurable page size and navigation.
Instructions
Get a paginated list of all available voices for voice conversion and TTS
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of voices per page (default: 20) | |
| page | No | Page number for pagination (default: 0) |
Implementation Reference
- src/index.ts:788-804 (handler)The main handler function for the 'get_all_voices' tool. It extracts pagination parameters from args, makes a GET request to the MusicGPT API endpoint '/getAllVoices', and returns the response data as formatted JSON text in MCP content format.private async handleGetAllVoices(args: any) { const params = { limit: args.limit || 20, page: args.page || 0, }; const response = await this.axiosInstance.get("/getAllVoices", { params }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/index.ts:89-103 (schema)Input schema definition for the 'get_all_voices' tool, specifying optional 'limit' and 'page' parameters for pagination.inputSchema: { type: "object" as const, properties: { limit: { type: "number", description: "Maximum number of voices per page (default: 20)", default: 20, }, page: { type: "number", description: "Page number for pagination (default: 0)", default: 0, }, }, },
- src/index.ts:86-104 (registration)Tool definition and registration in the TOOLS array, which is returned by the ListToolsRequest handler. Includes name, description, and input schema.{ name: "get_all_voices", description: "Get a paginated list of all available voices for voice conversion and TTS", inputSchema: { type: "object" as const, properties: { limit: { type: "number", description: "Maximum number of voices per page (default: 20)", default: 20, }, page: { type: "number", description: "Page number for pagination (default: 0)", default: 0, }, }, }, },
- src/index.ts:663-664 (registration)Registration/dispatch in the switch statement within the CallToolRequestSchema handler, routing calls to 'get_all_voices' to the specific handleGetAllVoices method.case "get_all_voices": return await this.handleGetAllVoices(args);