create_cover_song
Transform any song into a cover version using different vocal styles. Upload an audio file and select a voice model to generate a personalized musical reinterpretation.
Instructions
Create a cover version of a song with a different voice or style
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_url | Yes | URL of the original audio file | |
| voice_id | Yes | Voice model ID to use for the cover (use get_all_voices to find IDs) | |
| webhook_url | No | URL for callback upon completion |
Implementation Reference
- src/index.ts:854-873 (handler)The handler function that implements the core logic for the 'create_cover_song' tool. It validates inputs, makes a POST request to the '/cover' API endpoint of MusicGPT, and returns the task details with instructions to poll status.private async handleCreateCover(args: any) { if (!args.audio_url || !args.voice_id) { throw new McpError(ErrorCode.InvalidParams, "audio_url and voice_id are required"); } const response = await this.axiosInstance.post("/cover", { audio_url: args.audio_url, voice_id: args.voice_id, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Cover song creation started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`, }, ], }; }
- src/index.ts:161-182 (schema)The tool definition in the TOOLS array, including name, description, and input schema for validation.{ name: "create_cover_song", description: "Create a cover version of a song with a different voice or style", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the original audio file", }, voice_id: { type: "string", description: "Voice model ID to use for the cover (use get_all_voices to find IDs)", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url", "voice_id"], }, },
- src/index.ts:671-672 (registration)The switch case in the CallToolRequestSchema handler that routes calls to 'create_cover_song' to the handleCreateCover function.case "create_cover_song": return await this.handleCreateCover(args);