Skip to main content
Glama
williamzujkowski

Strudel MCP Server

save

Store music patterns with names and tags for reuse in TidalCycles/Strudel live coding sessions.

Instructions

Save pattern with metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPattern name
tagsNo

Implementation Reference

  • Registration of the 'save' tool in getTools() array, including name, description, and input schema definition.
      name: 'save',
      description: 'Save pattern with metadata',
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'Pattern name' },
          tags: { type: 'array', items: { type: 'string' } }
        },
        required: ['name']
      }
    },
  • Handler implementation in executeTool switch statement: validates args, retrieves current pattern, calls store.save, returns success message.
    case 'save':
      InputValidator.validateStringLength(args.name, 'name', 255, false);
      const toSave = await this.getCurrentPatternSafe();
      if (!toSave) {
        return 'No pattern to save';
      }
      await this.store.save(args.name, toSave, args.tags || []);
      return `Pattern saved as "${args.name}"`;
  • PatternStore.save method: persists pattern data as JSON file with metadata, updates cache, sanitizes filename.
    async save(name: string, content: string, tags: string[] = []): Promise<void> {
      await this.ensureDirectory();
    
      const filename = this.sanitizeFilename(name) + '.json';
      const filepath = path.join(this.basePath, filename);
    
      const data: PatternData = {
        name,
        content,
        tags,
        timestamp: new Date().toISOString(),
      };
    
      // Update cache
      this.patternCache.set(name, data);
      this.listCache = null; // Invalidate list cache
    
      // Write file asynchronously
      await fs.writeFile(filepath, JSON.stringify(data, null, 2));
    }
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose if this is a write operation, what permissions are needed, whether it overwrites existing patterns, or what happens on success/failure. For a tool named 'save', this lack of context is a significant gap.

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 with a single phrase, 'Save pattern with metadata', which is front-loaded and wastes no words. It efficiently conveys the core action, though this brevity contributes to vagueness in other dimensions.

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 incomplete parameter documentation, the description is insufficient. It doesn't explain what a 'pattern' is, how saving works, or what the result looks like, leaving critical gaps for an AI agent to understand and invoke it 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 50% (only 'name' has a description). The description adds minimal value by mentioning 'metadata', which loosely relates to 'tags', but doesn't explain parameter meanings beyond the schema. With two parameters and partial coverage, the description doesn't adequately compensate for the gaps.

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 'Save pattern with metadata' states the action (save) and resource (pattern) but is vague about what constitutes a 'pattern' or 'metadata' in this context. It doesn't distinguish from siblings like 'write' or 'compose', leaving ambiguity about whether this creates new patterns or updates existing ones.

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 'write', 'compose', or 'generate_pattern'. The description implies persistence but doesn't specify prerequisites, such as needing an existing pattern to save or whether it's for finalizing edits.

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