Skip to main content
Glama

extract_key_bpm

Analyze audio files to identify musical key and tempo (BPM), providing essential metadata for music production and analysis.

Instructions

Extract musical key and BPM (tempo) from audio

Input Schema

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

Implementation Reference

  • The main handler function for the 'extract_key_bpm' tool. Validates input, makes an HTTP POST request to the external API endpoint '/extract_key_bpm', and returns the API response containing task information.
    private async handleExtractKeyBpm(args: any) { if (!args.audio_url) { throw new McpError(ErrorCode.InvalidParams, "audio_url is required"); } const response = await this.axiosInstance.post("/extract_key_bpm", { audio_url: args.audio_url, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Key and BPM extraction started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`, }, ], }; }
  • src/index.ts:543-560 (registration)
    Tool registration in the TOOLS array, including name, description, and input schema. This array is returned by the ListTools request handler.
    { name: "extract_key_bpm", description: "Extract musical key and BPM (tempo) from audio", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to analyze", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], }, },
  • Dispatch case in the main tool execution switch statement that routes calls to the 'extract_key_bpm' handler.
    case "extract_key_bpm": return await this.handleExtractKeyBpm(args);
  • Input schema definition for the 'extract_key_bpm' tool, specifying parameters and validation.
    inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to analyze", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url"], },

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