Skip to main content
Glama

inpaint_audio

Fill missing or corrupted audio sections using AI by specifying start and end times to restore damaged recordings.

Instructions

Fill in missing or corrupted parts of audio using AI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesURL of the audio file with gaps to fill
start_timeYesStart time of the section to inpaint in seconds
end_timeYesEnd time of the section to inpaint in seconds
webhook_urlNoURL for callback upon completion

Implementation Reference

  • The handler function for the 'inpaint_audio' tool. Validates required parameters (audio_url, start_time, end_time), sends a POST request to the '/inpaint' API endpoint with axios, and returns a text content response with the task status and instructions to check progress.
    private async handleInpaintAudio(args: any) { if (!args.audio_url || args.start_time === undefined || args.end_time === undefined) { throw new McpError(ErrorCode.InvalidParams, "audio_url, start_time, and end_time are required"); } const response = await this.axiosInstance.post("/inpaint", { audio_url: args.audio_url, start_time: args.start_time, end_time: args.end_time, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio inpainting started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`, }, ], }; }
  • The tool schema definition in the TOOLS array, including name, description, and inputSchema specifying properties and required fields for input validation.
    { name: "inpaint_audio", description: "Fill in missing or corrupted parts of audio using AI", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file with gaps to fill", }, start_time: { type: "number", description: "Start time of the section to inpaint in seconds", }, end_time: { type: "number", description: "End time of the section to inpaint in seconds", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url", "start_time", "end_time"], }, },
  • src/index.ts:707-708 (registration)
    The switch case in the CallToolRequestHandler that routes execution to the handleInpaintAudio method.
    case "inpaint_audio": return await this.handleInpaintAudio(args);
  • src/index.ts:644-650 (registration)
    The ListTools request handler that returns the TOOLS array, which includes the 'inpaint_audio' tool definition.
    // Handle tool listing this.server.setRequestHandler( ListToolsRequestSchema, async () => ({ tools: TOOLS, }) );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pasie15/mcp-server-musicgpt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server