Skip to main content
Glama

sing_over_instrumental

Add AI-generated vocals to instrumental tracks by providing lyrics and selecting a voice model, enabling users to create complete songs with synthesized singing.

Instructions

Add AI-generated vocals over an instrumental track

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instrumental_urlYesURL of the instrumental audio file
lyricsYesLyrics to sing
voice_idYesVoice model ID to use for singing (use get_all_voices to find IDs)
webhook_urlNoURL for callback upon completion

Implementation Reference

  • Handler function that executes the tool: validates required parameters (instrumental_url, lyrics, voice_id), forwards the request to the MusicGPT API endpoint '/sing_over_instrumental', and returns task status information.
    private async handleSingOverInstrumental(args: any) {
      if (!args.instrumental_url || !args.lyrics || !args.voice_id) {
        throw new McpError(ErrorCode.InvalidParams, "instrumental_url, lyrics, and voice_id are required");
      }
    
      const response = await this.axiosInstance.post("/sing_over_instrumental", {
        instrumental_url: args.instrumental_url,
        lyrics: args.lyrics,
        voice_id: args.voice_id,
        webhook_url: args.webhook_url,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Singing over instrumental 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 definition for the tool, specifying required parameters: instrumental_url, lyrics, voice_id, and optional webhook_url.
    {
      name: "sing_over_instrumental",
      description: "Add AI-generated vocals over an instrumental track",
      inputSchema: {
        type: "object" as const,
        properties: {
          instrumental_url: {
            type: "string",
            description: "URL of the instrumental audio file",
          },
          lyrics: {
            type: "string",
            description: "Lyrics to sing",
          },
          voice_id: {
            type: "string",
            description: "Voice model ID to use for singing (use get_all_voices to find IDs)",
          },
          webhook_url: {
            type: "string",
            description: "URL for callback upon completion",
          },
        },
        required: ["instrumental_url", "lyrics", "voice_id"],
      },
    },
  • src/index.ts:709-710 (registration)
    Registration in the tool dispatch switch statement: maps tool name to the handleSingOverInstrumental handler.
    case "sing_over_instrumental":
      return await this.handleSingOverInstrumental(args);
  • src/index.ts:645-650 (registration)
    Registration of the tools list handler, which includes the sing_over_instrumental tool schema via the TOOLS array.
    this.server.setRequestHandler(
      ListToolsRequestSchema,
      async () => ({
        tools: TOOLS,
      })
    );
  • Tool type constant used in get_conversion_by_id helper tool for polling status of sing_over_instrumental conversions.
    "SING_OVER_INSTRUMENTAL",

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