Skip to main content
Glama
dandeliongold

Decent-Sampler Drums MCP Server

configure_mic_routing

Set up multi-mic routing with MIDI volume controls for drum samples in DecentSampler. Route each mic position to separate DAW outputs and configure MIDI CC mappings for mixing flexibility.

Instructions

Configure multi-mic routing with MIDI controls for drum samples.

This tool will:

  • Set up individual volume controls for each mic position (close, OH L/R, room L/R)

  • Route each mic to its own auxiliary output for DAW mixing

  • Configure MIDI CC mappings for mic volumes

  • Generate proper XML structure for DecentSampler

Error Handling:

  • Validates mic position assignments

  • Checks for duplicate MIDI CC assignments

  • Ensures valid output routing targets

  • Verifies bus indices are unique and valid

  • Returns specific errors for routing conflicts

Success Response: Returns XML structure containing:

  • Configured mic bus routing

  • Volume control mappings

  • MIDI CC assignments

  • Complete routing matrix for all samples

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
micBusesYes
drumPiecesYes

Implementation Reference

  • Main execution handler for the configure_mic_routing tool. Validates input using validateMicRouting, constructs AdvancedDrumKitConfig with micBuses, generates and returns XML via generateGroupsXml.
    case "configure_mic_routing": {
      const args = request.params.arguments;
      if (!args || typeof args !== 'object' || !Array.isArray(args.micBuses) || !Array.isArray(args.drumPieces)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          "Invalid arguments: expected object with micBuses and drumPieces"
        );
      }
    
      try {
        // Validate mic routing configuration
        validateMicRouting(
          args.micBuses as MicBusConfig[],
          args.drumPieces.flatMap(piece => 
            (piece.samples as Array<{ micConfig?: DrumMicConfig }>)
              .map(sample => sample.micConfig)
              .filter((config): config is DrumMicConfig => !!config)
          )
        );
    
        // Create AdvancedDrumKitConfig with mic routing
        const config: AdvancedDrumKitConfig = {
          globalSettings: {
            micBuses: args.micBuses as MicBusConfig[]
          },
          drumPieces: args.drumPieces as AdvancedDrumKitConfig['drumPieces']
        };
    
        // Generate XML with mic routing
        const xml = generateGroupsXml(config);
        return {
          content: [{
            type: "text",
            text: xml
          }]
        };
      } catch (error: unknown) {
        if (error instanceof McpError) throw error;
        const message = error instanceof Error ? error.message : String(error);
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to configure mic routing: ${message}`
        );
      }
    }
  • src/index.ts:284-385 (registration)
    Tool registration in ListToolsRequestSchema response, including full description and detailed inputSchema for micBuses and drumPieces configurations.
          {
            name: "configure_mic_routing",
            description: `Configure multi-mic routing with MIDI controls for drum samples.
    
    This tool will:
    - Set up individual volume controls for each mic position (close, OH L/R, room L/R)
    - Route each mic to its own auxiliary output for DAW mixing
    - Configure MIDI CC mappings for mic volumes
    - Generate proper XML structure for DecentSampler
    
    Error Handling:
    - Validates mic position assignments
    - Checks for duplicate MIDI CC assignments
    - Ensures valid output routing targets
    - Verifies bus indices are unique and valid
    - Returns specific errors for routing conflicts
    
    Success Response:
    Returns XML structure containing:
    - Configured mic bus routing
    - Volume control mappings
    - MIDI CC assignments
    - Complete routing matrix for all samples`,
            inputSchema: {
              type: "object",
              properties: {
                micBuses: {
                  type: "array",
                  items: {
                    type: "object",
                    properties: {
                      name: { 
                        type: "string",
                        description: "Display name for the mic (e.g., 'Close Mic', 'OH L')"
                      },
                      outputTarget: { 
                        type: "string",
                        description: "Output routing (e.g., 'AUX_STEREO_OUTPUT_1')"
                      },
                      volume: {
                        type: "object",
                        properties: {
                          default: { 
                            type: "number",
                            description: "Default volume in dB"
                          },
                          min: { 
                            type: "number",
                            description: "Minimum volume in dB (e.g., -96)"
                          },
                          max: { 
                            type: "number",
                            description: "Maximum volume in dB (e.g., 12)"
                          },
                          midiCC: { 
                            type: "number",
                            description: "MIDI CC number for volume control"
                          }
                        },
                        required: ["default"]
                      }
                    },
                    required: ["name", "outputTarget"]
                  }
                },
                drumPieces: {
                  type: "array",
                  items: {
                    type: "object",
                    properties: {
                      name: { type: "string" },
                      rootNote: { type: "number" },
                      samples: {
                        type: "array",
                        items: {
                          type: "object",
                          properties: {
                            path: { type: "string" },
                            micConfig: {
                              type: "object",
                              properties: {
                                position: {
                                  type: "string",
                                  enum: ["close", "overheadLeft", "overheadRight", "roomLeft", "roomRight"]
                                },
                                busIndex: { type: "number" },
                                volume: { type: "number" }
                              },
                              required: ["position", "busIndex"]
                            }
                          },
                          required: ["path", "micConfig"]
                        }
                      }
                    },
                    required: ["name", "rootNote", "samples"]
                  }
                }
              },
              required: ["micBuses", "drumPieces"]
            }
          },
  • Input schema definition specifying structure for micBuses array and drumPieces with samples and micConfig.
    inputSchema: {
      type: "object",
      properties: {
        micBuses: {
          type: "array",
          items: {
            type: "object",
            properties: {
              name: { 
                type: "string",
                description: "Display name for the mic (e.g., 'Close Mic', 'OH L')"
              },
              outputTarget: { 
                type: "string",
                description: "Output routing (e.g., 'AUX_STEREO_OUTPUT_1')"
              },
              volume: {
                type: "object",
                properties: {
                  default: { 
                    type: "number",
                    description: "Default volume in dB"
                  },
                  min: { 
                    type: "number",
                    description: "Minimum volume in dB (e.g., -96)"
                  },
                  max: { 
                    type: "number",
                    description: "Maximum volume in dB (e.g., 12)"
                  },
                  midiCC: { 
                    type: "number",
                    description: "MIDI CC number for volume control"
                  }
                },
                required: ["default"]
              }
            },
            required: ["name", "outputTarget"]
          }
        },
        drumPieces: {
          type: "array",
          items: {
            type: "object",
            properties: {
              name: { type: "string" },
              rootNote: { type: "number" },
              samples: {
                type: "array",
                items: {
                  type: "object",
                  properties: {
                    path: { type: "string" },
                    micConfig: {
                      type: "object",
                      properties: {
                        position: {
                          type: "string",
                          enum: ["close", "overheadLeft", "overheadRight", "roomLeft", "roomRight"]
                        },
                        busIndex: { type: "number" },
                        volume: { type: "number" }
                      },
                      required: ["position", "busIndex"]
                    }
                  },
                  required: ["path", "micConfig"]
                }
              }
            },
            required: ["name", "rootNote", "samples"]
          }
        }
      },
      required: ["micBuses", "drumPieces"]
    }
  • Validation helper function called by the handler to validate mic bus configurations and mic routings before generating XML.
    export function validateMicRouting(
      buses: MicBusConfig[],
      mics: DrumMicConfig[]
    ): void {
      // First validate bus configurations
      validateBusConfigurations(buses);
      
      // Then validate mic routings
      validateMicRoutings(buses, mics);
    }
  • Type definitions for MicBusConfig and DrumMicConfig used in the tool's input validation and config building.
    export interface MicVolumeConfig {
      default: number;     // dB value
      min?: number;        // Optional min dB
      max?: number;        // Optional max dB
      midiCC?: number;     // MIDI CC number for volume control
    }
    
    export interface MicBusConfig {
      name: string;          // e.g., "Close Mic", "OH L"
      outputTarget: string;  // e.g., "AUX_STEREO_OUTPUT_1"
      volume?: MicVolumeConfig;
      effects?: any[];       // Placeholder for future effects support
    }
    
    export interface DrumMicConfig {
      position: 'close' | 'overheadLeft' | 'overheadRight' | 'roomLeft' | 'roomRight';
      busIndex: number;      // Reference to which bus this mic routes to
      volume?: number;       // Optional per-sample volume adjustment
    }
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 behaviors: error handling (validations for mic positions, MIDI CC duplicates, routing conflicts) and success response (XML structure with routing, mappings, assignments). However, it lacks details on side effects, performance, or authentication needs, which would be beneficial for a configuration tool.

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 well-structured with clear sections (purpose, error handling, success response) and uses bullet points for readability. It is appropriately sized but could be slightly more concise by integrating some bullet points into flowing text without losing clarity.

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 complexity (2 parameters with nested objects, no output schema, no annotations), the description is mostly complete. It covers purpose, behaviors, and parameter semantics effectively. However, it lacks output details beyond XML content, and with no annotations, additional context like side effects or rate limits would improve completeness.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It does so by explaining the purpose and structure of parameters: 'micBuses' for volume controls and routing, 'drumPieces' for samples with mic configurations. The description adds meaning beyond the bare schema, clarifying how parameters relate to the tool's functionality.

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: 'Configure multi-mic routing with MIDI controls for drum samples.' It specifies the exact actions (setting up volume controls, routing to auxiliary outputs, configuring MIDI mappings, generating XML) and distinguishes itself from sibling tools like 'configure_drum_controls' or 'generate_drum_groups' by focusing on mic routing specifically.

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 like 'configure_drum_controls' or 'generate_drum_groups'. It lists what the tool does but does not specify scenarios, prerequisites, or exclusions, leaving the agent without context for tool selection.

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/dandeliongold/mcp-decent-sampler-drums'

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