Skip to main content
Glama

audio_to_midi

Convert audio files to MIDI format for music production and editing. This tool processes audio URLs to create editable MIDI data.

Instructions

Convert audio to MIDI format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesURL of the audio file to convert to MIDI
webhook_urlNoURL for callback upon completion

Implementation Reference

  • The handler function for the 'audio_to_midi' tool. Validates the 'audio_url' parameter, sends a POST request to the '/audio_to_midi' backend endpoint with optional webhook_url, and returns a formatted response containing the task details and instructions to check status using another tool.
    private async handleAudioToMidi(args: any) { if (!args.audio_url) { throw new McpError(ErrorCode.InvalidParams, "audio_url is required"); } const response = await this.axiosInstance.post("/audio_to_midi", { audio_url: args.audio_url, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio to MIDI conversion started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`, }, ], }; }
  • The schema definition for the 'audio_to_midi' tool in the TOOLS array, specifying name, description, and inputSchema with required 'audio_url' and optional 'webhook_url'.
    { name: "audio_to_midi", description: "Convert audio to MIDI format", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to convert to MIDI", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], }, },
  • src/index.ts:717-718 (registration)
    The switch case in the tool execution handler that routes calls to 'audio_to_midi' to the specific handleAudioToMidi method.
    case "audio_to_midi": return await this.handleAudioToMidi(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