create_custom_grid_layout
Define custom window grid layouts for high-resolution displays by specifying columns and rows, enabling precise window arrangement on macOS.
Instructions
Create a custom grid layout (e.g., 3x2, 4x3) for high-res displays
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layoutName | Yes | Name for the grid layout | |
| columns | Yes | Number of columns in the grid | |
| rows | Yes | Number of rows in the grid |
Implementation Reference
- src/index.js:514-539 (handler)The main handler function for the 'create_custom_grid_layout' tool. It executes an AppleScript to display a notification as a placeholder implementation, noting that the full grid layout feature is coming soon.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 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)Dispatch case in the CallToolRequest handler that routes to the createCustomGridLayout method.case 'create_custom_grid_layout': return await this.createCustomGridLayout(args.layoutName, args.columns, args.rows);