Skip to main content
Glama
DeveloperZo

MCP Audio Tweaker

by DeveloperZo

advanced_process

Apply pitch shifting, spectral adjustments, dynamics processing, and spatial effects to audio files for enhanced sound quality and creative manipulation.

Instructions

Apply advanced audio processing including pitch shifting, spectral processing, dynamics, and spatial effects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputFileYesPath to input audio file
outputFileYesPath for output file
pitchNoPitch shifting operations
tempoNoTempo adjustment operations
spectralNoSpectral processing operations
dynamicsNoDynamics processing operations
spatialNoSpatial processing operations
overwriteNoWhether to overwrite existing output files

Implementation Reference

  • Handler for the 'advanced_process' tool: constructs operations from input params and calls AdvancedAudioProcessor.processAudioFile to execute the processing.
    case 'advanced_process': {
      const input = args as any;
      const operations = {
        advanced: {
          pitch: input.pitch,
          tempo: input.tempo,
          spectral: input.spectral,
          dynamics: input.dynamics,
          spatial: input.spatial
        }
      };
      
      const result = await advancedProcessor.processAudioFile(
        input.inputFile,
        input.outputFile,
        operations,
        input.overwrite || false
      );
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • Tool definition including name, description, and detailed inputSchema for all advanced processing parameters.
    export const advancedProcessTool: Tool = {
      name: 'advanced_process',
      description: 'Apply advanced audio processing including pitch shifting, spectral processing, dynamics, and spatial effects',
      inputSchema: {
        type: 'object',
        properties: {
          inputFile: {
            type: 'string',
            description: 'Path to input audio file'
          },
          outputFile: {
            type: 'string',
            description: 'Path for output file'
          },
          pitch: {
            type: 'object',
            description: 'Pitch shifting operations',
            properties: {
              semitones: { type: 'number', minimum: -12, maximum: 12 },
              cents: { type: 'number', minimum: -100, maximum: 100 },
              preserveFormants: { type: 'boolean' }
            },
            optional: true
          },
          tempo: {
            type: 'object',
            description: 'Tempo adjustment operations',
            properties: {
              factor: { type: 'number', minimum: 0.5, maximum: 2.0 },
              preservePitch: { type: 'boolean' }
            },
            optional: true
          },
          spectral: {
            type: 'object',
            description: 'Spectral processing operations',
            properties: {
              bassBoost: { type: 'number', minimum: -12, maximum: 12 },
              trebleBoost: { type: 'number', minimum: -12, maximum: 12 },
              midCut: { type: 'number', minimum: -12, maximum: 12 },
              warmth: { type: 'number', minimum: 0, maximum: 1 },
              brightness: { type: 'number', minimum: 0, maximum: 1 }
            },
            optional: true
          },
          dynamics: {
            type: 'object',
            description: 'Dynamics processing operations',
            properties: {
              compressor: {
                type: 'object',
                properties: {
                  threshold: { type: 'number', minimum: -60, maximum: 0 },
                  ratio: { type: 'number', minimum: 1, maximum: 20 },
                  attack: { type: 'number', minimum: 0.1, maximum: 100 },
                  release: { type: 'number', minimum: 1, maximum: 1000 }
                }
              },
              gate: {
                type: 'object',
                properties: {
                  threshold: { type: 'number', minimum: -80, maximum: 0 },
                  ratio: { type: 'number', minimum: 1, maximum: 20 }
                }
              }
            },
            optional: true
          },
          spatial: {
            type: 'object',
            description: 'Spatial processing operations',
            properties: {
              stereoWidth: { type: 'number', minimum: 0, maximum: 2 },
              panPosition: { type: 'number', minimum: -1, maximum: 1 },
              reverbSend: { type: 'number', minimum: 0, maximum: 1 },
              delayTime: { type: 'number', minimum: 0, maximum: 1000 },
              delayFeedback: { type: 'number', minimum: 0, maximum: 0.95 }
            },
            optional: true
          },
          overwrite: {
            type: 'boolean',
            description: 'Whether to overwrite existing output files',
            default: false
          }
        },
        required: ['inputFile', 'outputFile']
      }
    };
  • Registration of advancedProcessTool in the exported tools array used by registerTools function.
    export const tools = [
      processAudioFileTool,
      batchProcessAudioTool,
      applyPresetTool,
      listPresetsTool,
      getQueueStatusTool,
      generateVariationsTool,
      createHarmonicsTool,
      advancedProcessTool,
      layerSoundsTool
    ];
  • Core implementation: applyAdvancedOperations builds and applies FFmpeg audio filters for pitch, tempo, spectral EQ, dynamics, and spatial effects based on tool input.
    protected applyAdvancedOperations(command: any, advanced: AdvancedEffectsOperation): void {
      const filters: string[] = [];
      
      // Pitch shifting
      if (advanced.pitch) {
        filters.push(this.buildPitchFilter(advanced.pitch));
      }
      
      // Tempo adjustment
      if (advanced.tempo) {
        filters.push(this.buildTempoFilter(advanced.tempo));
      }
      
      // Spectral processing
      if (advanced.spectral) {
        const spectralFilter = this.buildSpectralFilter(advanced.spectral);
        if (spectralFilter) {
          filters.push(spectralFilter);
        }
      }
      
      // Dynamics processing
      if (advanced.dynamics) {
        filters.push(...this.buildDynamicsFilters(advanced.dynamics));
      }
      
      // Spatial processing
      if (advanced.spatial) {
        filters.push(...this.buildSpatialFilters(advanced.spatial));
      }
      
      // Modulation effects
      if (advanced.modulation) {
        filters.push(...this.buildModulationFilters(advanced.modulation));
      }
      
      // Apply all filters
      if (filters.length > 0) {
        command.audioFilters(filters);
      }
    }
  • Instantiation of AdvancedAudioProcessor used by the advanced_process handler.
    const advancedProcessor = new AdvancedAudioProcessor();
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Apply advanced audio processing' implies a transformative operation, it doesn't disclose critical behaviors: whether processing is destructive to the original file, computational requirements, supported audio formats, error handling, or typical processing time. The description mentions effect categories but not how they're applied or sequenced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word contributes meaning by listing the four processing categories. However, it could be slightly more structured by separating the tool's primary function from its capabilities.

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

Completeness2/5

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

For a complex audio processing tool with 8 parameters (including nested objects), no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns (success/failure, processing metadata, error messages), doesn't address performance characteristics, and provides minimal guidance for a tool with substantial parameter complexity and multiple sibling alternatives.

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?

With 100% schema description coverage, the schema already documents all 8 parameters thoroughly. The description adds minimal value beyond the schema by naming the processing categories (pitch, spectral, dynamics, spatial) that correspond to optional parameter objects, but doesn't provide additional context about parameter interactions, default behaviors when optional params are omitted, or processing order.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 verbs ('Apply advanced audio processing') and resources ('audio'), listing key processing categories (pitch shifting, spectral processing, dynamics, spatial effects). However, it doesn't explicitly differentiate this from sibling tools like 'process_audio_file' or 'apply_preset', which likely handle similar audio processing tasks.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'process_audio_file', 'apply_preset', and 'batch_process_audio', there's no indication whether this is for complex multi-effect processing, real-time vs batch operations, or when simpler tools might suffice.

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/DeveloperZo/mcp-audio-tweaker'

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