Skip to main content
Glama

generate_fill

Create custom drum fills by specifying style and number of bars. Designed for AI-assisted music patterns in Strudel MCP Server, supporting TidalCycles and live coding workflows.

Instructions

Generate drum fill

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
barsNoNumber of bars
styleYesFill style

Implementation Reference

  • Handler for 'generate_fill' tool in executeTool switch statement. Calls PatternGenerator.generateFill and writes the result to the pattern editor.
    case 'generate_fill': const fill = this.generator.generateFill(args.style, args.bars || 1); const currentFill = await this.getCurrentPatternSafe(); const newFillPattern = currentFill ? currentFill + '\n' + fill : fill; await this.writePatternSafe(newFillPattern); return `Generated ${args.bars || 1} bar fill`;
  • Tool registration in getTools() array, including name, description, and input schema.
    name: 'generate_fill', description: 'Generate drum fill', inputSchema: { type: 'object', properties: { style: { type: 'string', description: 'Fill style' }, bars: { type: 'number', description: 'Number of bars' } }, required: ['style'] } }
  • Core implementation of generateFill method that returns style-specific drum fill patterns based on input style and number of bars.
    generateFill(style: string, bars: number = 1): string { const fills: Record<string, string> = { techno: `s("bd*8, cp*4").fast(${bars})`, house: `s("bd*4, cp*2, hh*16").fast(${bars})`, dnb: `s("bd*8, sn*8").fast(${bars * 2})`, trap: `s("bd*4, hh*32").fast(${bars})`, breakbeat: `s("bd cp bd cp, hh*8").iter(4).fast(${bars})` }; return fills[style] || fills.techno; }

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