master_audio
Apply professional audio mastering to enhance sound quality by processing audio files through the MusicGPT MCP Server, improving clarity and balance.
Instructions
Apply professional audio mastering to improve sound quality
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_url | Yes | URL of the audio file to master | |
| webhook_url | No | URL for callback upon completion |
Implementation Reference
- src/index.ts:1099-1117 (handler)The main handler function for the 'master_audio' tool. It validates input, makes a POST request to the '/audio_mastering' endpoint, and returns a formatted response with task status information.private async handleMasterAudio(args: any) { if (!args.audio_url) { throw new McpError(ErrorCode.InvalidParams, "audio_url is required"); } const response = await this.axiosInstance.post("/audio_mastering", { audio_url: args.audio_url, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio mastering 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:408-421 (schema)Input schema definition for the 'master_audio' tool, specifying required 'audio_url' and optional 'webhook_url' parameters.inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to master", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], },
- src/index.ts:405-422 (registration)Tool registration object in the TOOLS array, which is returned by the ListTools handler.{ name: "master_audio", description: "Apply professional audio mastering to improve sound quality", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to master", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], }, },
- src/index.ts:701-702 (registration)Case statement in the main tool dispatcher switch that routes 'master_audio' calls to the handleMasterAudio function.case "master_audio": return await this.handleMasterAudio(args);