Skip to main content
Glama

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'] } } ];

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