save_current_layout
Save your current window arrangement as a named layout in Moom for macOS, enabling quick restoration of your preferred workspace setup.
Instructions
Save the current window arrangement as a new Moom layout
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layoutName | Yes | Name for the new layout |
Implementation Reference
- src/index.js:313-341 (handler)The handler function that saves the current window arrangement as a new Moom layout using AppleScript.async saveCurrentLayout(layoutName) { // Use AppleScript to save layout const script = ` tell application "Moom" save layout and replace "${layoutName}" end tell `; try { await this.runAppleScript(script); return { content: [ { type: 'text', text: `Successfully saved layout: ${layoutName}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error saving layout: ${error.message}`, }, ], }; } }
- src/index.js:49-58 (schema)Input schema defining the required 'layoutName' parameter for the tool.inputSchema: { type: 'object', properties: { layoutName: { type: 'string', description: 'Name for the new layout', }, }, required: ['layoutName'], }, },
- src/index.js:211-212 (registration)Registration of the tool in the CallToolRequestHandler switch statement, dispatching to the handler method.case 'save_current_layout': return await this.saveCurrentLayout(args.layoutName);