search_voices
Find specific voices by name to use for audio generation and voice conversion tasks within the MusicGPT audio processing system.
Instructions
Search for voices by name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| voice_name | Yes | Name of the voice to search for |
Implementation Reference
- src/index.ts:806-823 (handler)The handler function that executes the search_voices tool. Validates input, calls the MusicGPT API endpoint /searchVoices with voice_name parameter, and returns the response as JSON text.private async handleSearchVoices(args: any) { if (!args.voice_name) { throw new McpError(ErrorCode.InvalidParams, "voice_name is required"); } const response = await this.axiosInstance.get("/searchVoices", { params: { voice_name: args.voice_name }, }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/index.ts:105-118 (schema)Tool schema definition in the TOOLS array, used for tool listing and validation. Specifies name, description, and input schema requiring 'voice_name' string.{ name: "search_voices", description: "Search for voices by name", inputSchema: { type: "object" as const, properties: { voice_name: { type: "string", description: "Name of the voice to search for", }, }, required: ["voice_name"], }, },
- src/index.ts:665-666 (registration)Tool name registration in the CallToolRequestSchema switch statement, dispatching calls to the handleSearchVoices handler.case "search_voices": return await this.handleSearchVoices(args);