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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only mentions what it returns (status, audio URL, metadata) without covering behavioral aspects like authentication needs, rate limits, error handling, or whether it's idempotent. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and key return values. Every word earns its place with no redundancy or unnecessary elaboration, making it appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read operation with 3 parameters and no output schema, the description covers the basic purpose and returns but lacks details on error cases, response format beyond listed items, or prerequisites. With no annotations and moderate complexity, it's adequate but has clear gaps in providing complete context for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value by mentioning 'task ID or conversion ID' which aligns with schema descriptions, but doesn't provide additional context beyond what's in the structured fields. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'details of a conversion', specifying it's by 'task ID or conversion ID'. It distinguishes from siblings by focusing on retrieval rather than creation or processing of audio, making the purpose specific and differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing status or metadata for a conversion, but doesn't explicitly state when to use this tool versus alternatives like checking conversion status through other means. It provides context by mentioning IDs but lacks explicit exclusions or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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