Skip to main content
Glama
pixxelboy
by pixxelboy

detect_ai_music

Analyze audio files to determine if music was AI-generated or human-made. Provides a confidence score and classification for uploaded audio URLs.

Instructions

Detect whether an audio file was generated by AI or created by humans. Accepts a public URL to an audio file (MP3, WAV, FLAC, OGG, M4A). Returns a confidence score (0-100) and classification (ai_generated, human_made, or uncertain).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesPublic URL to the audio file to analyze

Implementation Reference

  • The handler function that executes the detect_ai_music tool: validates the audio URL, calls the IRCAM AI Detector API via httpPost, handles errors, and returns the transformed detection result.
    export async function handleDetectAiMusic( args: Record<string, unknown> ): Promise<AIDetectionResult> { const audioUrl = args.audio_url as string; // Validate input const validation = validateAudioUrl(audioUrl); if (!validation.valid) { throw validation.error; } // Call IRCAM AI Detector API const url = buildApiUrl(IRCAM_API_CONFIG.ENDPOINTS.AI_DETECTOR); const response = await httpPost<IrcamAIDetectorResponse>(url, { url: audioUrl, }); if (!response.ok || !response.data) { throw response.error || formatError('UNKNOWN_ERROR', 'Failed to detect AI music'); } // Transform and return result return transformAIDetectorResponse(response.data); }
  • The Tool object defining the detect_ai_music tool's metadata, description, and input schema for MCP registration.
    export const detectAiMusicTool: Tool = { name: 'detect_ai_music', description: 'Detect whether an audio file was generated by AI or created by humans. ' + 'Accepts a public URL to an audio file (MP3, WAV, FLAC, OGG, M4A). ' + 'Returns a confidence score (0-100) and classification (ai_generated, human_made, or uncertain).', inputSchema: { type: 'object', properties: { audio_url: { type: 'string', description: 'Public URL to the audio file to analyze', }, }, required: ['audio_url'], }, };
  • src/index.ts:37-43 (registration)
    Registration of detectAiMusicTool in the TOOLS array returned by listTools MCP request.
    const TOOLS = [ analyzeMusicTool, separateStemsTool, detectAiMusicTool, analyzeLoudnessTool, checkJobStatusTool, ];
  • src/index.ts:48-54 (registration)
    Registration of 'detect_ai_music' handler in the TOOL_HANDLERS map used for callTool MCP request.
    const TOOL_HANDLERS: Record<string, (args: Record<string, unknown>) => Promise<unknown>> = { analyze_music: handleAnalyzeMusic, separate_stems: handleSeparateStems, detect_ai_music: handleDetectAiMusic, analyze_loudness: handleAnalyzeLoudness, check_job_status: handleCheckJobStatus, };
  • Type definitions for the output of detect_ai_music: AIClassification and AIDetectionResult.
    export type AIClassification = 'ai_generated' | 'human_made' | 'uncertain'; /** * Résultat de la détection IA */ export interface AIDetectionResult { /** Score de confiance 0-100 */ confidence: number; /** Classification finale */ classification: AIClassification; }

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/pixxelboy/amplify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server