Skip to main content
Glama
pixxelboy

IRCAM Amplify MCP Server

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;
    }
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: it analyzes audio files via URL, returns a confidence score and classification. However, it doesn't mention rate limits, authentication needs, error conditions, or processing time. The description doesn't contradict annotations (none exist).

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 appropriately sized and front-loaded: the first sentence states the core purpose, the second specifies input requirements, and the third describes the return values. Every sentence adds essential information with zero waste.

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

Completeness4/5

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

Given the tool's moderate complexity (classification task), no annotations, and no output schema, the description is fairly complete: it explains purpose, input requirements, and return values. However, it could benefit from more behavioral context (e.g., limitations, performance). The lack of output schema is partially compensated by describing return values in the description.

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 the audio_url parameter fully. The description adds marginal value by reiterating 'public URL' and listing acceptable formats, but doesn't provide additional syntax or constraints beyond what the schema provides. Baseline 3 is appropriate when schema does 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 tool's purpose with specific verb ('detect') and resource ('audio file'), specifying what it detects ('generated by AI or created by humans'). It distinguishes itself from sibling tools like analyze_loudness or analyze_music by focusing on AI/human classification rather than audio analysis or processing.

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

Usage Guidelines3/5

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

The description implies usage context by specifying acceptable file formats (MP3, WAV, FLAC, OGG, M4A) and that it accepts public URLs, but doesn't explicitly state when to use this tool versus alternatives like analyze_music or when not to use it (e.g., for non-audio files or private URLs). No explicit alternatives or exclusions are mentioned.

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

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