Skip to main content
Glama
williamzujkowski

Strudel MCP Server

list

Retrieve saved music patterns from the Strudel MCP Server, optionally filtering by tag to organize your TidalCycles compositions.

Instructions

List saved patterns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoFilter by tag

Implementation Reference

  • Schema definition for the 'list' MCP tool, specifying name, description, and optional 'tag' input parameter.
    {
      name: 'list',
      description: 'List saved patterns',
      inputSchema: {
        type: 'object',
        properties: {
          tag: { type: 'string', description: 'Filter by tag' }
        }
      }
    },
  • Handler implementation in executeTool switch that validates input, calls PatternStore.list(), formats and returns the list of saved patterns.
    case 'list':
      if (args?.tag) {
        InputValidator.validateStringLength(args.tag, 'tag', 100, false);
      }
      const patterns = await this.store.list(args?.tag);
      return patterns.map(p =>
        `• ${p.name} [${p.tags.join(', ')}] - ${p.timestamp}`
      ).join('\n') || 'No patterns found';
  • Core helper method in PatternStore that reads pattern JSON files from disk, applies tag filtering if provided, sorts by timestamp, implements caching for unfiltered lists, and returns PatternData array.
    async list(tag?: string): Promise<PatternData[]> {
      // Use cached list if available and not expired
      const now = Date.now();
      if (!tag && this.listCache && (now - this.listCache.timestamp) < this.LIST_CACHE_TTL) {
        return this.listCache.patterns;
      }
    
      try {
        const files = await fs.readdir(this.basePath);
        const patterns: PatternData[] = [];
    
        // Parallel file reading for better performance
        const readPromises = files
          .filter(file => file.endsWith('.json'))
          .map(async (file) => {
            const filepath = path.join(this.basePath, file);
            const data = await fs.readFile(filepath, 'utf-8');
            return JSON.parse(data) as PatternData;
          });
    
        const allPatterns = await Promise.all(readPromises);
    
        // Filter and sort
        const filteredPatterns = tag
          ? allPatterns.filter(p => p.tags.includes(tag))
          : allPatterns;
    
        const sorted = filteredPatterns.sort((a, b) =>
          b.timestamp.localeCompare(a.timestamp)
        );
    
        // Update cache only for non-filtered lists
        if (!tag) {
          this.listCache = { patterns: sorted, timestamp: now };
        }
    
        return sorted;
      } catch (error) {
        this.logger.warn(`Failed to list patterns${tag ? ` with tag: ${tag}` : ''}`, error);
        return [];
      }
    }
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 read-only, what permissions are needed, how results are returned (e.g., pagination), or any side effects, leaving critical gaps for agent understanding.

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 a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, making it easy to parse quickly without unnecessary elaboration.

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 no annotations and no output schema, the description is incomplete. It lacks details on return values, error handling, or behavioral traits, which are essential for a tool with potential complexity in listing operations. More context is needed for effective use.

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 fully documents the 'tag' parameter. The description adds no parameter semantics beyond what the schema provides, but with high coverage, the baseline is 3 as the schema handles the heavy lifting.

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 'List saved patterns' states the basic action (list) and resource (saved patterns), but it's vague about scope and format. It doesn't distinguish from siblings like 'list_history' or 'get_pattern', leaving ambiguity about what exactly is listed.

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 'get_pattern' or 'list_history'. The description lacks context about prerequisites, typical use cases, or exclusions, offering no help in tool selection.

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