Skip to main content
Glama
williamzujkowski

Strudel MCP Server

generate_chord_progression

Create chord progressions for music composition by specifying a key and style like pop, jazz, or blues.

Instructions

Generate chord progression

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey
styleYesStyle (pop/jazz/blues/etc)

Implementation Reference

  • Handler executes validation, generates progression using MusicTheory, creates Strudel chord pattern using PatternGenerator, writes to editor, and returns summary.
    case 'generate_chord_progression':
      InputValidator.validateRootNote(args.key);
      InputValidator.validateChordStyle(args.style);
      const progression = this.theory.generateChordProgression(args.key, args.style);
      const chordPattern = this.generator.generateChords(progression);
      const currentChords = await this.getCurrentPatternSafe();
      const newChordPattern = currentChords ? currentChords + '\n' + chordPattern : chordPattern;
      await this.writePatternSafe(newChordPattern);
      return `Generated ${args.style} progression in ${args.key}: ${progression}`;
  • Tool registration in getTools() array, including name, description, and input schema.
    {
      name: 'generate_chord_progression',
      description: 'Generate chord progression',
      inputSchema: {
        type: 'object',
        properties: {
          key: { type: 'string', description: 'Key' },
          style: { type: 'string', description: 'Style (pop/jazz/blues/etc)' }
        },
        required: ['key', 'style']
      }
    },
  • Core method generates chord progression string from key and style using predefined progressions and chord mappings.
    generateChordProgression(key: string, style: keyof typeof this.chordProgressions): string {
      const progression = this.chordProgressions[style];
      if (!progression) {
        throw new Error(`Invalid progression style: ${style}`);
      }
      
      const chordMap: Record<string, string> = {
        'I': `"${key}"`,
        'I7': `"${key}7"`,
        'i': `"${key.toLowerCase()}m"`,
        'ii': `"${this.getNote(key, 2)}m"`,
        'IIM7': `"${this.getNote(key, 2)}m7"`,
        'iii': `"${this.getNote(key, 4)}m"`,
        'III': `"${this.getNote(key, 4)}"`,
        'IV': `"${this.getNote(key, 5)}"`,
        'IV7': `"${this.getNote(key, 5)}7"`,
        'V': `"${this.getNote(key, 7)}"`,
        'V7': `"${this.getNote(key, 7)}7"`,
        'vi': `"${this.getNote(key, 9)}m"`,
        'VI': `"${this.getNote(key, 9)}"`,
        'VII': `"${this.getNote(key, 11)}"`,
        'bVII': `"${this.getNote(key, 10)}"`,
        'IM7': `"${key}maj7"`
      };
    
      return progression
        .map(chord => chordMap[chord] || `"${key}"`)
        .join(' ');
    }
  • Helper converts chord progression string to Strudel pattern code with voicing options.
    generateChords(progression: string, voicing: string = 'triad'): string {
      const voicings: Record<string, string> = {
        triad: '.struct("1 ~ ~ ~")',
        seventh: '.struct("1 ~ ~ ~").add(note("7"))',
        sustained: '.attack(0.5).release(2)',
        stab: '.struct("1 ~ 1 ~").release(0.1)',
        pad: '.attack(2).release(4).room(0.8)'
      };
      
      return `note(${progression}).s("sawtooth")${voicings[voicing] || voicings.triad}`;
    }
  • Input schema defines required parameters key and style as strings.
    inputSchema: {
      type: 'object',
      properties: {
        key: { type: 'string', description: 'Key' },
        style: { type: 'string', description: 'Style (pop/jazz/blues/etc)' }
      },
      required: ['key', 'style']
    }
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Generate chord progression' gives no information about what the tool actually does - whether it returns a simple chord sequence, includes timing information, provides MIDI output, or has any constraints. It doesn't mention permissions, rate limits, or any behavioral characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While technically concise with just two words, this is under-specification rather than effective conciseness. The description doesn't provide enough information to be useful. A truly concise description would still convey essential information in minimal words, but this fails to do so.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and a description that's essentially just the tool name, this is completely inadequate. The description doesn't explain what the tool returns, how it behaves, or provide any meaningful context for an AI agent to understand when and how to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (key and style). The description adds no additional meaning about what these parameters do or how they affect the chord progression generation. The baseline score of 3 reflects adequate parameter documentation through the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Generate chord progression' is essentially a tautology that restates the tool name. While it indicates the tool creates chord progressions, it lacks specificity about what kind of progression or how it's generated. It doesn't distinguish this tool from sibling tools like 'compose' or 'generate_melody' that might also create musical content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools for generating musical elements (generate_bassline, generate_melody, generate_pattern, etc.), but the description offers no context about when chord progression generation is appropriate versus other musical generation tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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