master_audio
Apply professional audio mastering to enhance sound quality by processing audio files through the MusicGPT MCP Server.
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 handler function that executes the master_audio tool by validating input, making a POST request to the MusicGPT API /audio_mastering endpoint, and returning the response with status check instructions.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 defining the parameters for the master_audio tool: required audio_url and optional webhook_url.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)The tool definition object in the TOOLS array, which registers the master_audio tool for listing via ListToolsRequestSchema, including name, description, and input schema.{ 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)The switch case in the CallToolRequestSchema handler that dispatches execution to the handleMasterAudio method.case "master_audio": return await this.handleMasterAudio(args);