Skip to main content
Glama
williamzujkowski

Strudel MCP Server

load

Retrieve saved music patterns from storage for use in live coding sessions with Strudel.cc, enabling AI-assisted music generation and audio manipulation.

Instructions

Load saved pattern

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPattern name

Implementation Reference

  • Main handler logic for the 'load' MCP tool. Validates input, loads pattern from store, writes it to the Strudel editor, and returns success/error message.
    case 'load':
      InputValidator.validateStringLength(args.name, 'name', 255, false);
      const saved = await this.store.load(args.name);
      if (saved) {
        await this.writePatternSafe(saved.content);
        return `Loaded pattern "${args.name}"`;
      }
      return `Pattern "${args.name}" not found`;
  • Tool registration in getTools() method, including name, description, and input schema. Used by MCP server for tool listing.
      name: 'load',
      description: 'Load saved pattern',
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'Pattern name' }
        },
        required: ['name']
      }
    },
  • Input schema definition for the 'load' tool, specifying required 'name' parameter as string.
    inputSchema: {
      type: 'object',
      properties: {
        name: { type: 'string', description: 'Pattern name' }
      },
      required: ['name']
    }
  • Helper method in PatternStore that loads a saved pattern from JSON file, with caching and error handling.
    async load(name: string): Promise<PatternData | null> {
      // Check cache first
      if (this.patternCache.has(name)) {
        return this.patternCache.get(name)!;
      }
    
      const filename = this.sanitizeFilename(name) + '.json';
      const filepath = path.join(this.basePath, filename);
    
      try {
        const data = await fs.readFile(filepath, 'utf-8');
        const pattern = JSON.parse(data);
    
        // Update cache
        this.patternCache.set(name, pattern);
    
        return pattern;
      } catch (error) {
        this.logger.warn(`Failed to load pattern: ${name}`, error);
        return null;
      }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Load saved pattern' implies a read operation that retrieves data, but it doesn't specify what happens after loading (e.g., does it replace current patterns, add to a workspace, or just return data?), whether it requires specific permissions, or any side effects like memory usage changes. The description is minimal and lacks operational details.

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

Conciseness4/5

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

The description is extremely concise with just three words, making it front-loaded and waste-free. However, it borders on under-specification, as it lacks necessary detail for clarity. It's efficient but may be too brief to be fully helpful.

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?

Given the complexity of a tool that likely interacts with saved patterns in a music/audio context, the description is incomplete. With no annotations, no output schema, and minimal behavioral details, it fails to explain what 'loading' entails operationally, what is returned, or how it differs from similar tools. This leaves significant gaps for an AI agent to understand and use the tool correctly.

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%, with the single parameter 'name' documented as 'Pattern name' in the schema. The description doesn't add any meaning beyond this, such as format examples or constraints. Since schema coverage is high, the baseline is 3, as the description doesn't compensate but doesn't detract either.

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 'Load saved pattern' is a tautology that essentially restates the tool name 'load' with minimal additional information. It specifies the verb 'load' and resource 'saved pattern', but doesn't distinguish this from sibling tools like 'get_pattern', 'restore_history', or 'list' which might also retrieve patterns. The purpose is vague about what 'loading' entails operationally.

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. With siblings like 'get_pattern', 'restore_history', 'list', and 'list_history', the description doesn't clarify if this is for retrieving a specific pattern by name, restoring from a history, or another purpose. There's no mention of prerequisites, exclusions, or contextual usage.

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