Skip to main content
Glama

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
NameRequiredDescriptionDefault
layoutNameYesName for the new layout

Implementation Reference

  • 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}`, }, ], }; } }
  • 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);

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/itrimble/moom-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server