Skip to main content
Glama

extract_audio

Extract vocals, instruments, or specific stems from audio files to isolate musical components for remixing, analysis, or creative projects.

Instructions

Extract vocals, instruments, or specific stems from audio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesURL of the audio file to process
extraction_typeYesType of extraction to perform
webhook_urlNoURL for callback upon completion

Implementation Reference

  • The handler function that implements the core logic of the 'extract_audio' tool. It validates inputs, sends a POST request to the external '/extraction' API endpoint, and returns a formatted response with task status information.
    private async handleExtractAudio(args: any) { if (!args.audio_url || !args.extraction_type) { throw new McpError(ErrorCode.InvalidParams, "audio_url and extraction_type are required"); } const response = await this.axiosInstance.post("/extraction", { audio_url: args.audio_url, extraction_type: args.extraction_type, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio extraction started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`, }, ], }; }
  • The input schema definition for the 'extract_audio' tool, specifying parameters, types, descriptions, enum values, and required fields.
    inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to process", }, extraction_type: { type: "string", description: "Type of extraction to perform", enum: ["vocals", "instrumental", "drums", "bass", "piano", "other"], }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url", "extraction_type"], },
  • src/index.ts:253-275 (registration)
    The tool registration object in the TOOLS constant array, which is returned by the listTools handler. Includes name, description, and input schema.
    { name: "extract_audio", description: "Extract vocals, instruments, or specific stems from audio", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to process", }, extraction_type: { type: "string", description: "Type of extraction to perform", enum: ["vocals", "instrumental", "drums", "bass", "piano", "other"], }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url", "extraction_type"], }, },
  • src/index.ts:683-684 (registration)
    The switch case in the CallToolRequestSchema handler that registers and dispatches 'extract_audio' tool calls to the corresponding handler method.
    case "extract_audio": return await this.handleExtractAudio(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