remix_audio
Create a remix of an audio track by specifying a URL and remix style to transform music with AI-powered audio processing.
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 handler function that implements the core logic for the 'remix_audio' tool. It validates input, calls the MusicGPT API endpoint '/remix', and returns the task information with instructions for status checking.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-444 (registration)The tool registration entry in the TOOLS array, which includes the name, description, and input schema. This is returned by the list tools handler.{ 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)The switch case in the main tool execution handler that routes calls to the 'remix_audio' tool to its specific handler function.case "remix_audio": return await this.handleRemixAudio(args);
- src/index.ts:426-442 (schema)The input schema definition for the 'remix_audio' tool, defining parameters like audio_url (required), remix_style, and webhook_url.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"],