Skip to main content
Glama
williamzujkowski

Strudel MCP Server

undo

Reverse the most recent change in your Strudel music pattern to correct mistakes or experiment with different compositions.

Instructions

Undo last action

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler logic for the 'undo' tool. It checks if initialized, pops the previous pattern from undoStack, writes it to the controller, pushes current to redoStack, and returns success or 'Nothing to undo'.
    case 'undo':
      if (!this.isInitialized) {
        return 'Browser not initialized. Run init first.';
      }
      if (this.undoStack.length > 0) {
        const currentUndo = await this.controller.getCurrentPattern();
        this.redoStack.push(currentUndo);
        // Enforce bounds to prevent memory leaks
        if (this.redoStack.length > this.MAX_HISTORY) {
          this.redoStack.shift();
        }
        const previous = this.undoStack.pop()!;
        await this.controller.writePattern(previous);
        return 'Undone';
      }
      return 'Nothing to undo';
  • Schema definition for the 'undo' tool, including name, description, and empty input schema (no parameters required).
    name: 'undo',
    description: 'Undo last action',
    inputSchema: { type: 'object', properties: {} }
  • Registration of the tool list handler which returns all tools including 'undo' via getTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: this.getTools()
    }));
  • Declaration of undoStack and redoStack used by the undo/redo functionality.
    private undoStack: string[] = [];
    private redoStack: string[] = [];
Behavior2/5

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

With no annotations, the description carries full burden but only states the basic function. It doesn't disclose behavioral traits such as whether undo is limited to certain actions, if it requires specific states (e.g., after a change), what happens on failure, or if it's reversible itself. This leaves critical gaps for safe agent use.

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-loaded with the core action. There's zero waste, making it easy to parse quickly, though this brevity contributes to gaps in other dimensions.

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 an undo operation in a music toolset with no annotations or output schema, the description is incomplete. It lacks details on what 'last action' means, success/failure behavior, interactions with history, or output expectations, making it inadequate for reliable agent use.

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 with 100% schema coverage, so no parameter documentation is needed. The description doesn't add param info, which is appropriate here, earning a baseline score above minimum due to the lack of parameters.

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 'Undo last action' states a clear verb ('undo') and target ('last action'), but it's vague about what constitutes an 'action' in this music/audio context. It doesn't differentiate from sibling 'redo' or 'restore_history', leaving ambiguity about scope and reversibility.

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?

No guidance is provided on when to use this tool versus alternatives like 'redo' or 'restore_history'. The description implies it's for reversing recent changes but doesn't specify prerequisites, limitations, or context for invocation.

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