Skip to main content
Glama

add_effect

Apply audio effects to music patterns in Strudel MCP Server by specifying effect names and parameters for sound manipulation during AI-powered music generation.

Instructions

Add effect to pattern

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
effectYesEffect name
paramsNoEffect parameters

Implementation Reference

  • Handler for 'add_effect' tool: validates inputs, appends effect syntax (e.g., .effect(params)) to current pattern, writes it back to Strudel editor, returns confirmation.
    case 'add_effect': InputValidator.validateStringLength(args.effect, 'effect', 100, false); if (args.params) { InputValidator.validateStringLength(args.params, 'params', 1000, true); } const currentEffect = await this.getCurrentPatternSafe(); const withEffect = args.params ? currentEffect + `.${args.effect}(${args.params})` : currentEffect + `.${args.effect}()`; await this.writePatternSafe(withEffect); return `Added ${args.effect} effect`;
  • Schema definition for 'add_effect' tool in the tools list returned by getTools(), used for MCP tool listing and input validation.
    name: 'add_effect', description: 'Add effect to pattern', inputSchema: { type: 'object', properties: { effect: { type: 'string', description: 'Effect name' }, params: { type: 'string', description: 'Effect parameters' } }, required: ['effect'] } },
  • Registration of tool list handler; 'add_effect' is included in getTools() array.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: this.getTools() }));
  • Helper method that identifies 'add_effect' as requiring browser initialization before execution.
    private requiresInitialization(toolName: string): boolean { const toolsRequiringInit = [ 'write', 'append', 'insert', 'replace', 'play', 'pause', 'stop', 'clear', 'get_pattern', 'analyze', 'analyze_spectrum', 'analyze_rhythm', 'transpose', 'reverse', 'stretch', 'humanize', 'generate_variation', 'add_effect', 'add_swing', 'set_tempo', 'save', 'undo', 'redo', 'validate_pattern_runtime' ]; const toolsRequiringWrite = [ 'generate_pattern', 'generate_drums', 'generate_bassline', 'generate_melody', 'generate_chord_progression', 'generate_euclidean', 'generate_polyrhythm', 'generate_fill' ]; return toolsRequiringInit.includes(toolName) || toolsRequiringWrite.includes(toolName);

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/williamzujkowski/strudel-mcp-server'

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