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,
      })
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the action ('Fill in') but lacks details on permissions, rate limits, processing time, or output format (e.g., whether it returns a new audio file URL). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, making it easy to understand at a glance. Every word earns its place by conveying essential information concisely.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of an AI-based audio inpainting tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like mutation effects, error handling, or return values, leaving gaps that could hinder an AI agent's ability to use the tool correctly in practice.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond what's in the schema, such as explaining how 'start_time' and 'end_time' define the gap or what happens if 'webhook_url' is omitted. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Fill in') and resource ('missing or corrupted parts of audio'), and it specifies the method ('using AI'). However, it doesn't explicitly differentiate this from sibling tools like 'denoise_audio' or 'dereverb_audio', which also address audio quality issues but through different methods.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like handling gaps vs. noise, or compare to siblings such as 'denoise_audio' for noise removal or 'extend_audio' for lengthening audio. Without such context, users must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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