list_layouts
Retrieve saved window layouts for Moom on macOS to manage desktop organization and window positioning.
Instructions
List all saved Moom layouts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:250-282 (handler)The handler function for the 'list_layouts' tool. It executes an AppleScript command to list all Moom layouts, parses the result, and returns a JSON-formatted list or error message.async listLayouts() { const script = ` tell application "Moom" list of layouts end tell `; try { const result = await this.runAppleScript(script); const layouts = result.split(', ').map(name => name.trim()); return { content: [ { type: 'text', text: JSON.stringify({ layouts: layouts, count: layouts.length }, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error listing layouts: ${error.message}`, }, ], }; } }
- src/index.js:128-135 (registration)Registration of the 'list_layouts' tool in the ListToolsRequestSchema response, including name, description, and empty input schema.{ name: 'list_layouts', description: 'List all saved Moom layouts', inputSchema: { type: 'object', properties: {}, }, },
- src/index.js:131-134 (schema)Input schema definition for the 'list_layouts' tool, which requires no parameters (empty properties).inputSchema: { type: 'object', properties: {}, },
- src/index.js:217-218 (registration)Dispatch/registration in the CallToolRequestSchema switch statement that maps the tool name to its handler method.case 'list_layouts': return await this.listLayouts();