Skip to main content
Glama
williamzujkowski

Strudel MCP Server

screenshot

Capture the current Strudel music editor state as an image file for documentation or sharing.

Instructions

Take a screenshot of the current Strudel editor state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNoOptional filename for screenshot

Implementation Reference

  • Core handler function that executes the screenshot using Puppeteer page.screenshot() and handles filename and errors.
    async takeScreenshot(filename?: string): Promise<string> {
      if (!this._page) {
        throw new Error('Browser not initialized. Run init tool first.');
      }
    
      try {
        const path = filename || `strudel-screenshot-${Date.now()}.png`;
        await this._page.screenshot({ path, fullPage: false });
        return `Screenshot saved to ${path}`;
      } catch (error: any) {
        this.logger.error('Failed to take screenshot', error);
        throw new Error(`Failed to take screenshot: ${error.message}`);
      }
    }
  • MCP server dispatch handler for 'screenshot' tool call, which proxies to StrudelController.takeScreenshot after initialization check.
    case 'screenshot':
      if (!this.isInitialized) {
        return 'Browser not initialized. Run init first.';
      }
      return await this.controller.takeScreenshot(args?.filename);
  • Tool schema registration in getTools() array, defining name, description, and optional filename input schema.
      name: 'screenshot',
      description: 'Take a screenshot of the current Strudel editor state',
      inputSchema: {
        type: 'object',
        properties: {
          filename: { type: 'string', description: 'Optional filename for screenshot' }
        }
      }
    },
  • The screenshot tool is registered as part of the tools array returned by getTools(), used for ListTools MCP request.
      {
        name: 'screenshot',
        description: 'Take a screenshot of the current Strudel editor state',
        inputSchema: {
          type: 'object',
          properties: {
            filename: { type: 'string', description: 'Optional filename for screenshot' }
          }
        }
      },
    
      // UX Tools - Status & Diagnostics (#39)
      {
        name: 'status',
        description: 'Get current browser and playback status (quick state check)',
        inputSchema: { type: 'object', properties: {} }
      },
      {
        name: 'diagnostics',
        description: 'Get detailed browser diagnostics including cache, errors, and performance',
        inputSchema: { type: 'object', properties: {} }
      },
      {
        name: 'show_errors',
        description: 'Display captured console errors and warnings from Strudel',
        inputSchema: { type: 'object', properties: {} }
      },
    
      // UX Tools - High-level Compose (#42)
      {
        name: 'compose',
        description: 'Generate, write, and play a complete pattern in one step. Auto-initializes browser if needed.',
        inputSchema: {
          type: 'object',
          properties: {
            style: { type: 'string', description: 'Genre: techno, house, dnb, ambient, trap, jungle, jazz, experimental' },
            tempo: { type: 'number', description: 'BPM (default: genre-appropriate)' },
            key: { type: 'string', description: 'Musical key (default: C)' },
            auto_play: { type: 'boolean', description: 'Start playback immediately (default: true)' }
          },
          required: ['style']
        }
      }
    ];
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. It states the action but lacks behavioral details: it doesn't specify the output format (e.g., image file, base64 data), where the screenshot is saved, permissions needed, or any side effects (e.g., might pause execution). This is inadequate for a mutation tool with zero annotation coverage.

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 a single, clear sentence with zero wasted words. It's front-loaded with the core action and efficiently specifies the target, making it easy to parse and understand immediately.

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 (a mutation tool capturing editor state), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., file path, image data), error conditions, or behavioral nuances, leaving significant gaps for an AI agent to use it correctly.

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?

Schema description coverage is 100%, with the single parameter 'filename' documented as optional. The description adds no parameter-specific information beyond what the schema provides, such as file format constraints or default naming. Baseline 3 is appropriate since the schema handles the parameter documentation.

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 action ('Take a screenshot') and the target ('current Strudel editor state'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'save' or 'show_browser' which might also capture editor state in different ways, preventing a perfect score.

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. It doesn't mention prerequisites (e.g., requires the editor to be in a specific state), exclusions, or compare it to siblings like 'save' (which might save code) or 'show_browser' (which might display content).

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