Skip to main content
Glama
williamzujkowski

Strudel MCP Server

clear

Clear the Strudel.cc editor to remove existing patterns and start fresh with new music code.

Instructions

Clear the editor

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Schema definition for the 'clear' tool: no input parameters required, clears the editor.
    name: 'clear',
    description: 'Clear the editor',
    inputSchema: { type: 'object', properties: {} }
  • Handler implementation: calls writePatternSafe('') to clear the current pattern in the editor.
    case 'clear':
      return await this.writePatternSafe('');
  • Registers the listTools handler which returns all tools including 'clear' via getTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: this.getTools()
    }));
  • Helper method used by 'clear' handler to safely write an empty pattern, handling uninitialized state.
    private async writePatternSafe(pattern: string): Promise<string> {
      if (!this.isInitialized) {
        // Store the pattern for later use
        const id = `pattern_${Date.now()}`;
        this.generatedPatterns.set(id, pattern);
        return `Pattern generated (initialize Strudel to use it): ${pattern.substring(0, 50)}...`;
      }
      
      return await this.controller.writePattern(pattern);
    }
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. 'Clear the editor' implies a destructive operation, but it doesn't specify what gets cleared (e.g., all content, specific tracks, undo history), whether the action is reversible, or any side effects. For a potentially destructive tool with zero annotation coverage, this is inadequate behavioral disclosure.

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, front-loading the core action. Every word earns its place: 'Clear' specifies the action, 'the editor' specifies the target. No wasted words or unnecessary elaboration for such a simple tool.

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 this is a potentially destructive operation (clearing editor content) with no annotations and no output schema, the description is incomplete. It doesn't explain what 'clear' means operationally, what gets affected, or what the result looks like. For a tool that could significantly impact user work, more context is needed despite the simple parameter structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100% (though empty). With no parameters to document, the description doesn't need to compensate for schema gaps. The baseline for 0 parameters is 4, as there's nothing additional to explain beyond the empty schema.

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 'Clear the editor' states a specific action (clear) and target (the editor), which is better than a tautology. However, it doesn't distinguish this tool from potential alternatives like 'undo', 'remove_effect', or 'restore_history' that might also affect editor content. The purpose is clear but lacks sibling 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 'undo', 'remove_effect', and 'restore_history' that might serve similar cleanup purposes, there's no indication of when 'clear' is appropriate versus these other tools. No explicit when/when-not statements or alternatives are mentioned.

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