create_custom_grid_layout
Design personalized grid layouts (e.g., 3x2, 4x3) for high-resolution displays by specifying columns, rows, and layout names on Moom MCP Server for macOS window management.
Instructions
Create a custom grid layout (e.g., 3x2, 4x3) for high-res displays
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | Number of columns in the grid | |
| layoutName | Yes | Name for the grid layout | |
| rows | Yes | Number of rows in the grid |
Implementation Reference
- src/index.js:514-539 (handler)The handler function that executes the tool logic. It runs an AppleScript to display a notification as a placeholder for creating a custom grid layout.async createCustomGridLayout(layoutName, columns, rows) { const script = ` tell application "Moom" -- This would require Moom's grid API or custom positioning -- For now, we'll create a notification display notification "Grid layout ${columns}x${rows} would be created here" with title "${layoutName}" end tell `; try { await this.runAppleScript(script); return { content: [{ type: 'text', text: `Grid layout feature coming soon. For now, use Moom's built-in grid with ${columns}x${rows} dimensions.` }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error.message}` }] }; } }
- src/index.js:109-126 (schema)Input schema defining the parameters for the create_custom_grid_layout tool: layoutName (string), columns (integer), rows (integer).inputSchema: { type: 'object', properties: { layoutName: { type: 'string', description: 'Name for the grid layout', }, columns: { type: 'integer', description: 'Number of columns in the grid', }, rows: { type: 'integer', description: 'Number of rows in the grid', }, }, required: ['layoutName', 'columns', 'rows'], },
- src/index.js:106-127 (registration)Tool registration entry in the ListTools response, including name, description, and input schema.{ name: 'create_custom_grid_layout', description: 'Create a custom grid layout (e.g., 3x2, 4x3) for high-res displays', inputSchema: { type: 'object', properties: { layoutName: { type: 'string', description: 'Name for the grid layout', }, columns: { type: 'integer', description: 'Number of columns in the grid', }, rows: { type: 'integer', description: 'Number of rows in the grid', }, }, required: ['layoutName', 'columns', 'rows'], }, },
- src/index.js:221-222 (registration)Dispatcher case in the CallToolRequest handler that routes calls to the createCustomGridLayout method.case 'create_custom_grid_layout': return await this.createCustomGridLayout(args.layoutName, args.columns, args.rows);