Skip to main content
Glama
pixxelboy

IRCAM Amplify MCP Server

by pixxelboy

separate_stems

Separate audio files into individual stems like vocals, drums, bass, and instruments using IRCAM Amplify's audio processing. Accepts public URLs for MP3, WAV, FLAC, OGG, or M4A files.

Instructions

Separate an audio file into individual stems: vocals, drums, bass, and other instruments. Accepts a public URL to an audio file (MP3, WAV, FLAC, OGG, M4A). For longer files, returns a job_id for async processing - use check_job_status to monitor progress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesPublic URL to the audio file to separate

Implementation Reference

  • The handler function that validates the input audio URL, calls the IRCAM Stem Separator API, transforms the response, and returns either a JobReference for async processing or StemSeparationResult with stem URLs.
    export async function handleSeparateStems(
      args: Record<string, unknown>
    ): Promise<SeparateStemsOutput> {
      const audioUrl = args.audio_url as string;
    
      // Validate input
      const validation = validateAudioUrl(audioUrl);
      if (!validation.valid) {
        throw validation.error;
      }
    
      // Call IRCAM Stem Separator API
      const url = buildApiUrl(IRCAM_API_CONFIG.ENDPOINTS.STEM_SEPARATOR);
      const response = await httpPost<IrcamStemSeparatorResponse>(url, {
        url: audioUrl,
      });
    
      if (!response.ok || !response.data) {
        throw response.error || formatError('UNKNOWN_ERROR', 'Failed to separate stems');
      }
    
      // Transform response
      const transformed = transformStemSeparatorResponse(response.data);
    
      // Return either job reference or direct result
      if (transformed.job_id) {
        return { job_id: transformed.job_id } as JobReference;
      }
    
      return {
        vocals_url: transformed.vocals_url!,
        drums_url: transformed.drums_url!,
        bass_url: transformed.bass_url!,
        other_url: transformed.other_url!,
      } as StemSeparationResult;
    }
  • Tool definition including name, description, and input schema for the separate_stems tool.
    export const separateStemsTool: Tool = {
      name: 'separate_stems',
      description:
        'Separate an audio file into individual stems: vocals, drums, bass, and other instruments. ' +
        'Accepts a public URL to an audio file (MP3, WAV, FLAC, OGG, M4A). ' +
        'For longer files, returns a job_id for async processing - use check_job_status to monitor progress.',
      inputSchema: {
        type: 'object',
        properties: {
          audio_url: {
            type: 'string',
            description: 'Public URL to the audio file to separate',
          },
        },
        required: ['audio_url'],
      },
    };
  • Type definitions for StemSeparationResult and SeparateStemsOutput (union with JobReference).
    // Tool-Specific Types: separate_stems
    // ============================================================================
    
    /**
     * Résultat de la séparation de stems
     */
    export interface StemSeparationResult {
      /** URL du stem vocals */
      vocals_url: string;
      /** URL du stem drums */
      drums_url: string;
      /** URL du stem bass */
      bass_url: string;
      /** URL du stem other instruments */
      other_url: string;
    }
    
    /**
     * Output peut être soit un job_id (async) soit le résultat direct
     */
    export type SeparateStemsOutput = JobReference | StemSeparationResult;
  • src/index.ts:37-43 (registration)
    Registration of the separateStemsTool in the TOOLS array for listTools request.
    const TOOLS = [
      analyzeMusicTool,
      separateStemsTool,
      detectAiMusicTool,
      analyzeLoudnessTool,
      checkJobStatusTool,
    ];
  • src/index.ts:48-54 (registration)
    Mapping of 'separate_stems' tool name to its handler function in TOOL_HANDLERS for execution.
    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,
    };
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the tool accepts public URLs for specific audio formats (MP3, WAV, FLAC, OGG, M4A), handles async processing for longer files by returning a job_id, and requires monitoring with 'check_job_status'. It does not cover aspects like rate limits, authentication needs, or error handling, but provides substantial operational context.

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 front-loaded with the core purpose in the first sentence, followed by essential details about input format and async behavior. Every sentence adds critical information without redundancy, making it highly efficient and well-structured for quick comprehension.

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 (audio processing with async capabilities), no annotations, and no output schema, the description does a good job of covering key aspects: purpose, input requirements, and async workflow. It lacks details on output format (e.g., what is returned for successful separation) and error conditions, but provides enough context for basic usage in conjunction with the schema.

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?

The input schema has 100% description coverage, with the 'audio_url' parameter fully documented in the schema. The description adds minimal value beyond the schema by reiterating that it accepts a public URL to an audio file, but does not provide additional semantics like URL format constraints or file size limits. The baseline score of 3 is appropriate given the schema's comprehensive coverage.

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 specific action ('separate an audio file into individual stems') and lists the exact resources produced (vocals, drums, bass, and other instruments). It distinguishes this tool from sibling tools like 'analyze_loudness' or 'detect_ai_music' by focusing on audio separation rather than analysis or detection.

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 provides clear context for when to use this tool (for separating audio stems from a public URL) and mentions an alternative action for longer files (using 'check_job_status' to monitor async processing). However, it does not explicitly state when NOT to use this tool or compare it to other sibling tools like 'analyze_music' for different audio processing needs.

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