Skip to main content
Glama

get_conversion_by_id

Retrieve conversion details including status, audio URL, and metadata using a task ID or conversion ID for audio processing tasks.

Instructions

Get details of a conversion by its task ID or conversion ID. Returns status, audio URL, and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversionTypeYesType of conversion (must match MusicGPT API conversion types)
task_idNoTask ID associated with the conversion (provide either task_id or conversion_id)
conversion_idNoConversion ID to fetch details (provide either task_id or conversion_id)

Implementation Reference

  • The handler function that implements the core logic of the 'get_conversion_by_id' tool. It validates inputs, constructs API parameters, calls the MusicGPT API endpoint '/byId', and returns the response data as formatted text.
    private async handleGetConversionById(args: any) { if (!args.conversionType) { throw new McpError(ErrorCode.InvalidParams, "conversionType is required"); } if (!args.task_id && !args.conversion_id) { throw new McpError(ErrorCode.InvalidParams, "Either task_id or conversion_id is required"); } const params: any = { conversionType: args.conversionType }; if (args.task_id) params.task_id = args.task_id; if (args.conversion_id) params.conversion_id = args.conversion_id; const response = await this.axiosInstance.get("/byId", { params }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
  • Input schema for the tool, specifying the required 'conversionType' (enum of supported conversion types) and optional 'task_id' or 'conversion_id' parameters.
    inputSchema: { type: "object" as const, properties: { conversionType: { type: "string", description: "Type of conversion (must match MusicGPT API conversion types)", enum: [ "MUSIC_AI", "TEXT_TO_SPEECH", "VOICE_CONVERSION", "COVER", "EXTRACTION", "DENOISING", "DEECHO", "DEREVERB", "SOUND_GENERATOR", "AUDIO_TRANSCRIPTION", "AUDIO_SPEED_CHANGER", "AUDIO_MASTERING", "AUDIO_CUTTER", "REMIX", "FILE_CONVERT", "KEY_BPM_EXTRACTION", "AUDIO_TO_MIDI", "EXTEND", "INPAINT", "SING_OVER_INSTRUMENTAL", "LYRICS_GENERATOR", "STEMS_SEPARATION", "VOCAL_EXTRACTION" ], }, task_id: { type: "string", description: "Task ID associated with the conversion (provide either task_id or conversion_id)", }, conversion_id: { type: "string", description: "Conversion ID to fetch details (provide either task_id or conversion_id)", }, }, required: ["conversionType"], },
  • src/index.ts:39-85 (registration)
    Tool registration in the TOOLS array, including name, description, and input schema. This array is used by the MCP server to list available tools.
    { name: "get_conversion_by_id", description: "Get details of a conversion by its task ID or conversion ID. Returns status, audio URL, and metadata.", inputSchema: { type: "object" as const, properties: { conversionType: { type: "string", description: "Type of conversion (must match MusicGPT API conversion types)", enum: [ "MUSIC_AI", "TEXT_TO_SPEECH", "VOICE_CONVERSION", "COVER", "EXTRACTION", "DENOISING", "DEECHO", "DEREVERB", "SOUND_GENERATOR", "AUDIO_TRANSCRIPTION", "AUDIO_SPEED_CHANGER", "AUDIO_MASTERING", "AUDIO_CUTTER", "REMIX", "FILE_CONVERT", "KEY_BPM_EXTRACTION", "AUDIO_TO_MIDI", "EXTEND", "INPAINT", "SING_OVER_INSTRUMENTAL", "LYRICS_GENERATOR", "STEMS_SEPARATION", "VOCAL_EXTRACTION" ], }, task_id: { type: "string", description: "Task ID associated with the conversion (provide either task_id or conversion_id)", }, conversion_id: { type: "string", description: "Conversion ID to fetch details (provide either task_id or conversion_id)", }, }, required: ["conversionType"], }, },
  • src/index.ts:661-662 (registration)
    Dispatch case in the tool call handler that routes calls to 'get_conversion_by_id' to the specific handler method.
    case "get_conversion_by_id": return await this.handleGetConversionById(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