Skip to main content
Glama
williamzujkowski

Strudel MCP Server

stretch

Adjusts the timing of music patterns by applying a stretch factor to modify playback speed while preserving pitch.

Instructions

Time stretch pattern

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
factorYesStretch factor

Implementation Reference

  • Handler function for the 'stretch' tool. Validates the factor, retrieves the current pattern, appends .slow(factor) to stretch it temporally, writes the modified pattern, and returns a confirmation message.
    case 'stretch':
      InputValidator.validateGain(args.factor); // Positive number, use gain validator for simplicity
      const toStretch = await this.getCurrentPatternSafe();
      const stretched = toStretch + `.slow(${args.factor})`;
      await this.writePatternSafe(stretched);
      return `Stretched by factor of ${args.factor}`;
  • Tool registration in getTools() method, including name, description, and input schema requiring a numeric 'factor' parameter.
    {
      name: 'stretch',
      description: 'Time stretch pattern',
      inputSchema: {
        type: 'object',
        properties: {
          factor: { type: 'number', description: 'Stretch factor' }
        },
        required: ['factor']
      }
    },
  • Input schema definition for the 'stretch' tool, specifying the required 'factor' as a number.
    {
      name: 'stretch',
      description: 'Time stretch pattern',
      inputSchema: {
        type: 'object',
        properties: {
          factor: { type: 'number', description: 'Stretch factor' }
        },
        required: ['factor']
      }
    },
  • 'stretch' is listed in tools requiring initialization check.
    const toolsRequiringInit = [
      'write', 'append', 'insert', 'replace', 'play', 'pause', 'stop',
      'clear', 'get_pattern', 'analyze', 'analyze_spectrum', 'analyze_rhythm',
      'transpose', 'reverse', 'stretch', 'humanize', 'generate_variation',
      'add_effect', 'add_swing', 'set_tempo', 'save', 'undo', 'redo',
      'validate_pattern_runtime'
    ];
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Time stretch pattern' implies a transformation but doesn't specify whether it's destructive (modifies original), requires specific state (e.g., a loaded pattern), has side effects, or includes error handling. For a mutation tool with zero annotation coverage, this is inadequate.

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 three words, with no wasted verbiage. It's front-loaded with the core action ('Time stretch') and target ('pattern'), making it efficient for quick scanning. Every word earns its place by conveying the essential operation.

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 tool's likely complexity (temporal transformation of patterns), lack of annotations, and no output schema, the description is insufficient. It doesn't explain what a 'pattern' is in this context, how stretching affects timing or pitch, or what the return value might be. For a tool among many audio/MIDI siblings, more context is needed.

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 one parameter 'factor' documented as 'Stretch factor'. The description adds no additional meaning beyond this, such as typical value ranges (e.g., 0.5 for half-speed, 2.0 for double-speed) or effects on audio quality. With high schema coverage, the baseline score of 3 is appropriate.

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 'Time stretch pattern' is a tautology that essentially restates the tool name 'stretch' with minimal additional context. While it implies stretching a temporal pattern, it doesn't specify what kind of pattern (audio, MIDI, rhythmic) or what resource is being operated on. Compared to siblings like 'quantize', 'transpose', or 'reverse', it lacks differentiation in scope or target.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or related tools like 'quantize' or 'set_tempo' that might affect temporal manipulation. Without context, an agent cannot determine appropriate usage scenarios.

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