Skip to main content
Glama
williamzujkowski

Strudel MCP Server

replace

Find and substitute text patterns in Strudel music code to modify sequences, adjust parameters, or update musical elements during live coding sessions.

Instructions

Replace pattern section

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchYesText to replace
replaceYesReplacement text

Implementation Reference

  • Handler for the 'replace' MCP tool: validates search and replace string lengths, gets current pattern, replaces the first occurrence of search with replace, then writes the result via writePatternSafe.
    case 'replace':
      InputValidator.validateStringLength(args.search, 'search', 1000, true);
      InputValidator.validateStringLength(args.replace, 'replace', 10000, true);
      const pattern = await this.getCurrentPatternSafe();
      const replaced = pattern.replace(args.search, args.replace);
      return await this.writePatternSafe(replaced);
  • Registration of the 'replace' tool in getTools() array, including description and input schema (object with required 'search' and 'replace' strings).
    {
      name: 'replace',
      description: 'Replace pattern section',
      inputSchema: {
        type: 'object',
        properties: {
          search: { type: 'string', description: 'Text to replace' },
          replace: { type: 'string', description: 'Replacement text' }
        },
        required: ['search', 'replace']
      }
    },
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. 'Replace pattern section' implies a mutation operation, but it doesn't specify whether this is destructive (e.g., overwriting existing content), requires specific permissions, has side effects, or how it handles errors. For a tool with no annotation coverage, this leaves critical behavioral traits undisclosed.

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

Conciseness3/5

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

The description is extremely concise ('Replace pattern section'), which could be efficient if it were informative. However, it's under-specified rather than truly concise—it lacks essential details about what is being replaced and in what context. While front-loaded, it doesn't earn its place by adding sufficient value beyond the tool name.

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 implied by sibling tools (e.g., music/pattern processing domain), no annotations, and no output schema, the description is incomplete. It doesn't explain what a 'pattern section' is, what the tool returns, or how it integrates with other operations like 'undo' or 'save'. For a mutation tool in this context, more detail is needed to be adequately complete.

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 clear parameter documentation ('search' as 'Text to replace' and 'replace' as 'Replacement text'). The description adds no additional meaning beyond this, as it doesn't explain parameter interactions, constraints, or examples. With high schema coverage, the baseline score of 3 is appropriate, as the schema already provides adequate parameter semantics.

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 'Replace pattern section' is a tautology that essentially restates the tool name 'replace' with minimal additional context. It vaguely suggests operating on a 'pattern section' but doesn't specify what resource is being replaced or what a 'pattern section' refers to in this domain. Compared to sibling tools like 'transpose', 'quantize', or 'generate_melody', this lacks the specific verb+resource clarity needed for distinction.

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 any prerequisites, context, or exclusions, nor does it reference sibling tools like 'append', 'insert', or 'clear' that might handle similar text/pattern modifications. Without this, 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