Skip to main content
Glama

extend_audio

Generate AI-powered audio continuations to extend music tracks or sound files by specifying duration, enabling longer compositions from existing audio.

Instructions

Extend an audio track using AI to generate continuation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesURL of the audio file to extend
extension_durationNoDuration to extend in seconds
webhook_urlNoURL for callback upon completion

Implementation Reference

  • The handler function that implements the core logic for the 'extend_audio' tool. It validates input, makes a POST request to the '/extend' API endpoint with the audio URL and optional extension duration/webhook, and returns a status message with task details.
    private async handleExtendAudio(args: any) { if (!args.audio_url) { throw new McpError(ErrorCode.InvalidParams, "audio_url is required"); } const response = await this.axiosInstance.post("/extend", { audio_url: args.audio_url, extension_duration: args.extension_duration, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio extension 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 including name, description, and input schema for 'extend_audio', used for tool listing and validation.
    { name: "extend_audio", description: "Extend an audio track using AI to generate continuation", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to extend", }, extension_duration: { type: "number", description: "Duration to extend in seconds", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], }, },
  • src/index.ts:705-706 (registration)
    The dispatch case in the CallToolRequestSchema handler that routes 'extend_audio' tool calls to the handleExtendAudio method.
    case "extend_audio": return await this.handleExtendAudio(args);

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