Skip to main content
Glama

save_current_layout

Capture and store your current window arrangement as a new Moom layout for macOS, enabling quick restoration. Specify a unique layoutName to organize your desktop configurations efficiently.

Instructions

Save the current window arrangement as a new Moom layout

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layoutNameYesName for the new layout

Implementation Reference

  • The core handler function for the 'save_current_layout' tool. It constructs and executes an AppleScript command to save the current window arrangement as a new Moom layout with the specified name, returning success or error message.
    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:46-58 (registration)
    Tool registration in the ListToolsRequestSchema handler, including name, description, and input schema.
    { name: 'save_current_layout', description: 'Save the current window arrangement as a new Moom layout', inputSchema: { type: 'object', properties: { layoutName: { type: 'string', description: 'Name for the new layout', }, }, required: ['layoutName'], }, },
  • Input schema definition for the tool, specifying the required 'layoutName' parameter.
    inputSchema: { type: 'object', properties: { layoutName: { type: 'string', description: 'Name for the new layout', }, }, required: ['layoutName'], }, },
  • Dispatcher case in CallToolRequestSchema handler that routes the tool call to the saveCurrentLayout 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