Skip to main content
Glama

extend_audio

Generate AI-powered audio continuations to extend music tracks or sound recordings. Provide an audio URL and specify extension duration to create seamless additions to existing audio content.

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 executes the extend_audio tool logic by posting to the /extend API endpoint.
    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.`, }, ], };
  • Input schema for the extend_audio tool defining parameters 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)
    Switch case registration that routes extend_audio tool calls to the handler 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