Skip to main content
Glama

add_swing

Apply swing to Strudel music patterns by adjusting the swing amount (0-1) to modify rhythmic feel and groove in AI-powered music generation.

Instructions

Add swing to pattern

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesSwing amount (0-1)

Implementation Reference

  • The core handler logic for the 'add_swing' tool. It retrieves the current pattern, appends '.swing(${amount})' to it, writes the modified pattern back to the editor, and returns a confirmation message.
    case 'add_swing': const currentSwing = await this.getCurrentPatternSafe(); const withSwing = currentSwing + `.swing(${args.amount})`; await this.writePatternSafe(withSwing); return `Added swing: ${args.amount}`;
  • Input schema definition for the 'add_swing' tool, requiring a numeric 'amount' parameter between 0-1.
    name: 'add_swing', description: 'Add swing to pattern', inputSchema: { type: 'object', properties: { amount: { type: 'number', description: 'Swing amount (0-1)' } }, required: ['amount'] } },
  • Registration of the ListToolsRequestSchema handler, which returns the list of tools including 'add_swing' via getTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: this.getTools() }));
  • Handler logic for 'add_swing' in the original server implementation (similar to Fixed version).
    case 'add_swing': const currentSwing = await this.controller.getCurrentPattern(); const withSwing = currentSwing + `.swing(${args.amount})`; await this.controller.writePattern(withSwing); return `Added swing: ${args.amount}`;
  • Input schema for 'add_swing' tool in the original server.
    name: 'add_swing', description: 'Add swing to pattern', inputSchema: { type: 'object', properties: { amount: { type: 'number', description: 'Swing amount (0-1)' } }, required: ['amount'] } },

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