Skip to main content
Glama
williamzujkowski

Strudel MCP Server

append

Add code to extend existing music patterns in Strudel for live coding and AI-powered music generation.

Instructions

Append code to current pattern

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCode to append

Implementation Reference

  • Executes the 'append' tool: validates the code length, retrieves the current pattern safely, appends the new code with a newline, and writes the updated pattern back.
    case 'append':
      InputValidator.validateStringLength(args.code, 'code', 10000, true);
      const current = await this.getCurrentPatternSafe();
      return await this.writePatternSafe(current + '\n' + args.code);
  • Registers the 'append' tool with its name, description, and input schema in the getTools() method.
    {
      name: 'append',
      description: 'Append code to current pattern',
      inputSchema: {
        type: 'object',
        properties: {
          code: { type: 'string', description: 'Code to append' }
        },
        required: ['code']
      }
  • Defines the input schema for the 'append' tool, requiring a 'code' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        code: { type: 'string', description: 'Code to append' }
      },
      required: ['code']
  • Helper method in StrudelController that appends code to the current pattern by fetching it, concatenating, and writing back (similar logic to the tool handler).
    async appendPattern(code: string): Promise<string> {
      if (!this._page) {
        throw new Error('Browser not initialized. Run init tool first.');
      }
    
      const current = await this.getCurrentPattern();
      const newPattern = current + '\n' + code;
    
      return this.writePattern(newPattern);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It implies a mutation operation ('Append') but doesn't disclose behavioral traits such as whether this requires specific permissions, if it modifies the pattern in-place, what happens on failure, or any rate limits. This leaves significant gaps for a tool that likely alters state.

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 sentence, 'Append code to current pattern', which is front-loaded and wastes no words. Every part of the sentence contributes to understanding the tool's purpose efficiently.

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 mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'current pattern' refers to, how the append operation works, what the return value might be, or error conditions. This leaves the agent with insufficient information for reliable 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?

The description adds minimal meaning beyond the input schema, which has 100% coverage for the single parameter 'code'. It implies the parameter is used for appending, but doesn't provide additional context like format constraints or examples. With high schema coverage, the baseline is 3, and the description doesn't significantly enhance understanding.

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

Purpose4/5

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

The description clearly states the verb 'Append' and the resource 'code to current pattern', making the purpose understandable. However, it doesn't distinguish this tool from similar siblings like 'insert' or 'replace', which might also modify patterns, so it misses full differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'insert', 'replace', and 'compose' that might also modify patterns, there's no indication of context, prerequisites, or exclusions for using 'append'.

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