remix_audio
Create a remix of an audio track by specifying an audio URL and remix style. This tool transforms existing audio into new versions with different musical arrangements.
Instructions
Create a remix of an audio track
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_url | Yes | URL of the audio file to remix | |
| remix_style | No | Style of remix to create | |
| webhook_url | No | URL for callback upon completion |
Implementation Reference
- src/index.ts:1119-1138 (handler)The main handler function that executes the remix_audio tool. It validates the audio_url input, makes a POST request to the MusicGPT API /remix endpoint, and returns the task details with instructions to check status.private async handleRemixAudio(args: any) { if (!args.audio_url) { throw new McpError(ErrorCode.InvalidParams, "audio_url is required"); } const response = await this.axiosInstance.post("/remix", { audio_url: args.audio_url, remix_style: args.remix_style, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio remix 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:423-443 (schema)Defines the tool metadata including name, description, and input schema for remix_audio, used for tool listing and validation.{ name: "remix_audio", description: "Create a remix of an audio track", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to remix", }, remix_style: { type: "string", description: "Style of remix to create", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], },
- src/index.ts:703-704 (registration)Registers the remix_audio tool in the switch statement dispatcher for handling CallTool requests.case "remix_audio": return await this.handleRemixAudio(args);