Skip to main content
Glama

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); }

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