denoise_audio
Remove background noise from audio files to improve clarity and quality. Process audio by providing a URL, with optional webhook notification upon completion.
Instructions
Remove background noise from audio
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_url | Yes | URL of the audio file to denoise | |
| webhook_url | No | URL for callback upon completion |
Implementation Reference
- src/index.ts:971-989 (handler)The main handler function for the 'denoise_audio' tool. It validates the input, makes a POST request to the MusicGPT API '/denoise' endpoint with audio_url and optional webhook_url, and returns the response details including task_id for status checking.private async handleDenoiseAudio(args: any) { if (!args.audio_url) { throw new McpError(ErrorCode.InvalidParams, "audio_url is required"); } const response = await this.axiosInstance.post("/denoise", { audio_url: args.audio_url, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio denoising 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:278-295 (schema)Tool definition in the TOOLS array, providing the name, description, and input schema (requiring audio_url, optional webhook_url). This is used for tool listing and validation.{ name: "denoise_audio", description: "Remove background noise from audio", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to denoise", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], }, },
- src/index.ts:687-688 (registration)In the main CallToolRequestSchema handler's switch statement, routes 'denoise_audio' tool calls to the specific handleDenoiseAudio method.case "denoise_audio": return await this.handleDenoiseAudio(args);