Skip to main content
Glama
pixxelboy

IRCAM Amplify MCP Server

by pixxelboy

analyze_loudness

Measure audio loudness using EBU R128 standards. Analyze integrated loudness, true peak, and loudness range from audio files via URL to ensure broadcast compliance.

Instructions

Analyze the loudness of an audio file following EBU R128 standard. Accepts a public URL to an audio file (MP3, WAV, FLAC, OGG, M4A). Returns integrated loudness (LUFS), true peak (dB), and loudness range (LU).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesPublic URL to the audio file to analyze

Implementation Reference

  • The asynchronous handler function that processes the analyze_loudness tool call: validates the audio URL, calls the IRCAM Loudness Analyzer API via HTTP POST, and returns the transformed loudness analysis result (integrated LUFS, true peak dB, loudness range).
    export async function handleAnalyzeLoudness(
      args: Record<string, unknown>
    ): Promise<LoudnessAnalysisResult> {
      const audioUrl = args.audio_url as string;
    
      // Validate input
      const validation = validateAudioUrl(audioUrl);
      if (!validation.valid) {
        throw validation.error;
      }
    
      // Call IRCAM Loudness Analyzer API
      const url = buildApiUrl(IRCAM_API_CONFIG.ENDPOINTS.LOUDNESS_ANALYZER);
      const response = await httpPost<IrcamLoudnessResponse>(url, {
        url: audioUrl,
      });
    
      if (!response.ok || !response.data) {
        throw response.error || formatError('UNKNOWN_ERROR', 'Failed to analyze loudness');
      }
    
      // Transform and return result
      return transformLoudnessResponse(response.data);
    }
  • The MCP Tool object definition, including name, description, and inputSchema for validating the required 'audio_url' parameter.
    export const analyzeLoudnessTool: Tool = {
      name: 'analyze_loudness',
      description:
        'Analyze the loudness of an audio file following EBU R128 standard. ' +
        'Accepts a public URL to an audio file (MP3, WAV, FLAC, OGG, M4A). ' +
        'Returns integrated loudness (LUFS), true peak (dB), and loudness range (LU).',
      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 the analyzeLoudnessTool in the TOOLS array used by the MCP server for listTools requests.
    const TOOLS = [
      analyzeMusicTool,
      separateStemsTool,
      detectAiMusicTool,
      analyzeLoudnessTool,
      checkJobStatusTool,
    ];
  • src/index.ts:48-54 (registration)
    Mapping of tool name 'analyze_loudness' to its handler function in TOOL_HANDLERS, used during tool call 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,
    };
  • TypeScript type definition for the output of the analyze_loudness tool (LoudnessAnalysisResult).
    export interface LoudnessAnalysisResult {
      /** Integrated loudness en LUFS */
      integrated_lufs: number;
      /** True peak en dB */
      true_peak_db: number;
      /** Loudness range (LRA) en LU */
      loudness_range: number;
    }
Behavior3/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 adequately describes what the tool does (analyzes loudness) and what it returns (three specific metrics), but lacks information about potential limitations, error conditions, processing time, or authentication requirements. The description doesn't contradict any annotations since 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 efficiently structured in two sentences: the first states the purpose and standard, the second specifies input requirements and output metrics. Every element serves a clear purpose with zero wasted words, making it easy to parse and understand quickly.

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?

For a single-parameter tool with no annotations and no output schema, the description provides good coverage of what the tool does, what it accepts, and what it returns. It could be more complete by addressing potential limitations or error scenarios, but given the tool's relative simplicity, it provides sufficient context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100% with a single parameter clearly documented. The description adds valuable context by specifying supported file formats (MP3, WAV, FLAC, OGG, M4A) and clarifying that the URL must be public - information not present in the schema. This enhances understanding beyond the basic parameter documentation.

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 ('Analyze the loudness'), the target resource ('audio file'), and the technical standard ('EBU R128'). It distinguishes this tool from siblings like 'analyze_music' or 'detect_ai_music' by focusing specifically on loudness metrics rather than broader music analysis or AI detection.

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 for audio loudness analysis following a specific standard, but does not explicitly state when to use this tool versus alternatives like 'analyze_music' or 'separate_stems'. It provides some context about supported file formats but lacks explicit guidance on when-not-to-use scenarios or clear alternatives.

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