Skip to main content
Glama
williamzujkowski

Strudel MCP Server

compose

Generate and play complete music patterns in one step for genres like techno, house, or ambient. Auto-initializes browser for Strudel.cc live coding with customizable tempo, key, and playback.

Instructions

Generate, write, and play a complete pattern in one step. Auto-initializes browser if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
styleYesGenre: techno, house, dnb, ambient, trap, jungle, jazz, experimental
tempoNoBPM (default: genre-appropriate)
keyNoMusical key (default: C)
auto_playNoStart playback immediately (default: true)

Implementation Reference

  • Handler for the 'compose' tool: validates inputs, auto-initializes browser if needed, generates complete pattern via PatternGenerator, writes to editor, plays if requested, returns success with preview and metadata.
    case 'compose':
      InputValidator.validateStringLength(args.style, 'style', 100, false);
      if (args.key) {
        InputValidator.validateRootNote(args.key);
      }
      if (args.tempo !== undefined) {
        InputValidator.validateBPM(args.tempo);
      }
    
      // Auto-initialize if needed
      if (!this.isInitialized) {
        await this.controller.initialize();
        this.isInitialized = true;
      }
    
      // Generate pattern
      const composedPattern = this.generator.generateCompletePattern(
        args.style,
        args.key || 'C',
        args.tempo || this.getDefaultTempo(args.style)
      );
    
      // Write pattern
      await this.controller.writePattern(composedPattern);
    
      // Auto-play by default (unless explicitly set to false)
      const shouldPlay = args.auto_play !== false;
      if (shouldPlay) {
        await this.controller.play();
      }
    
      return {
        success: true,
        pattern: composedPattern.substring(0, 200) + (composedPattern.length > 200 ? '...' : ''),
        metadata: {
          style: args.style,
          bpm: args.tempo || this.getDefaultTempo(args.style),
          key: args.key || 'C'
        },
        status: shouldPlay ? 'playing' : 'ready',
        message: `Created ${args.style} pattern in ${args.key || 'C'}${shouldPlay ? ' - now playing' : ''}`
      };
  • Schema definition for 'compose' tool including input parameters: style (required), tempo, key, auto_play.
    {
      name: 'compose',
      description: 'Generate, write, and play a complete pattern in one step. Auto-initializes browser if needed.',
      inputSchema: {
        type: 'object',
        properties: {
          style: { type: 'string', description: 'Genre: techno, house, dnb, ambient, trap, jungle, jazz, experimental' },
          tempo: { type: 'number', description: 'BPM (default: genre-appropriate)' },
          key: { type: 'string', description: 'Musical key (default: C)' },
          auto_play: { type: 'boolean', description: 'Start playback immediately (default: true)' }
        },
        required: ['style']
      }
    }
  • Registration of tool list handler which includes the 'compose' tool via getTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: this.getTools()
    }));
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'Auto-initializes browser if needed,' which adds useful behavioral context about setup requirements. However, it lacks details on permissions, rate limits, what 'complete pattern' entails (e.g., length, complexity), or error handling. For a tool with multiple actions (generate/write/play) and no annotations, this is insufficient.

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

Conciseness5/5

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

The description is two concise sentences with zero waste: the first states the core purpose, and the second adds a key behavioral note. It's front-loaded with the main action and appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given no annotations, no output schema, and 4 parameters with full schema coverage, the description is minimally adequate. It covers the high-level purpose and one behavioral aspect (auto-initialization), but lacks details on output (what 'complete pattern' returns), error cases, or integration with sibling tools. For a multi-action tool, more context would be helpful.

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 all parameters (style, tempo, key, auto_play) with descriptions. The description adds no additional parameter semantics beyond what's in the schema. According to rules, baseline is 3 when schema coverage is high (>80%) and no param info is in the description.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Generate, write, and play a complete pattern in one step.' It specifies the action (generate/write/play) and resource (pattern), distinguishing it from more granular sibling tools like generate_pattern or play. However, it doesn't explicitly differentiate from tools like generate_pattern + write + play combinations.

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

Usage Guidelines3/5

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

The description implies usage context through 'in one step' and 'Auto-initializes browser if needed,' suggesting this is a comprehensive workflow tool. However, it doesn't explicitly state when to use this versus alternatives like manually chaining generate_pattern, write, and play, or when not to use it (e.g., for incremental work). No specific alternatives or exclusions are mentioned.

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