Skip to main content
Glama

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
NameRequiredDescriptionDefault
amountYesSwing 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'] } },
  • Registers the list tools handler which returns all tools including add_swing via getTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: this.getTools() }));

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