Skip to main content
Glama
williamzujkowski

Strudel MCP Server

generate_variation

Create variations of music patterns for TidalCycles/Strudel, supporting subtle, moderate, extreme, glitch, and evolving transformation types.

Instructions

Create pattern variations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoVariation type (subtle/moderate/extreme/glitch/evolving)

Implementation Reference

  • MCP tool handler in executeTool switch statement: retrieves current pattern, generates variation using PatternGenerator service, writes the varied pattern to the editor, and returns success message.
    case 'generate_variation':
      const toVary = await this.getCurrentPatternSafe();
      const varied = this.generator.generateVariation(toVary, args.type || 'subtle');
      await this.writePatternSafe(varied);
      return `Added ${args.type || 'subtle'} variation`;
  • Tool registration in getTools(): defines name, description, and input schema for the generate_variation tool.
    {
      name: 'generate_variation',
      description: 'Create pattern variations',
      inputSchema: {
        type: 'object',
        properties: {
          type: { type: 'string', description: 'Variation type (subtle/moderate/extreme/glitch/evolving)' }
        }
      }
    },
  • Input schema definition specifying optional 'type' parameter for variation styles.
    inputSchema: {
      type: 'object',
      properties: {
        type: { type: 'string', description: 'Variation type (subtle/moderate/extreme/glitch/evolving)' }
      }
    }
  • Core implementation in PatternGenerator service: appends Strudel-specific variation modifiers (e.g., fast, rev, jux) to the input pattern based on the specified type.
    generateVariation(pattern: string, variationType: string = 'subtle'): string {
      const variations: Record<string, string> = {
        subtle: '.sometimes(x => x.fast(2))',
        moderate: '.every(4, x => x.rev).sometimes(x => x.fast(2))',
        extreme: '.every(2, x => x.jux(rev)).sometimes(x => x.iter(4))',
        glitch: '.sometimes(x => x.chop(8).rev).rarely(x => x.speed(-1))',
        evolving: '.slow(4).every(8, x => x.fast(2)).every(16, x => x.palindrome)'
      };
      
      return pattern + (variations[variationType] || variations.subtle);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Create' implies a write operation, but it doesn't specify if this modifies existing data, requires specific permissions, has side effects, or what the output looks like. No rate limits, error conditions, or performance characteristics are mentioned.

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 extremely concise at two words, with zero wasted language. It's front-loaded with the core action and resource, making it easy to parse quickly.

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

Completeness2/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 vague purpose, the description is inadequate. It doesn't explain what a 'pattern' is in this context, what 'variations' entail, or how the tool fits among many sibling generation and manipulation tools. The agent lacks crucial context to use this 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?

The input schema has 100% description coverage, with the single parameter 'type' documented as 'Variation type (subtle/moderate/extreme/glitch/evolving)'. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline for high schema coverage.

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

Purpose3/5

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

The description 'Create pattern variations' clearly states the verb 'create' and resource 'pattern variations', but it's vague about what constitutes a 'pattern' and how this differs from similar tools like 'generate_pattern' or 'humanize'. It doesn't specify if it modifies existing patterns or generates new ones from scratch.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'generate_pattern', 'humanize', or 'transpose'. The description doesn't mention prerequisites, context, or exclusions, leaving the agent to guess based on the tool name alone.

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