add_swing
Apply swing to music patterns by adjusting rhythmic timing with a specified amount parameter to create syncopated grooves.
Instructions
Add swing to pattern
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Swing amount (0-1) |
Implementation Reference
- Executes the add_swing tool by appending `.swing(${args.amount})` to the current pattern and writing it back.case 'add_swing': InputValidator.validateNormalizedValue(args.amount, 'amount'); const currentSwing = await this.getCurrentPatternSafe(); const withSwing = currentSwing + `.swing(${args.amount})`; await this.writePatternSafe(withSwing); return `Added swing: ${args.amount}`;
- Defines the tool schema including name, description, and input schema requiring 'amount' as a number 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'] } },
- src/server/EnhancedMCPServerFixed.ts:571-573 (registration)Registers the list tools handler which returns all tools including add_swing via getTools().this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: this.getTools() }));