gridstack_cell_height
Adjust cell height in GridStack layouts using pixel values, 'auto', 'initial', or CSS units to customize dashboard grid dimensions and widget spacing.
Instructions
Update cell height
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| val | No | New cell height (px, 'auto', 'initial', CSS units) | |
| update | No | Update existing widgets |
Implementation Reference
- src/tools/index.ts:339-356 (registration)Tool registration including name, description, and input schema definition in the listTools() method.{ name: "gridstack_cell_height", description: "Update cell height", inputSchema: { type: "object", properties: { val: { oneOf: [{ type: "number" }, { type: "string" }], description: "New cell height (px, 'auto', 'initial', CSS units)", }, update: { type: "boolean", description: "Update existing widgets", default: true, }, }, }, },
- src/tools/index.ts:795-796 (registration)Tool handler registration in the central callTool switch statement dispatcher.case "gridstack_cell_height": return this.cellHeight(args as CellHeightParams);
- src/tools/index.ts:967-980 (handler)The main handler function for 'gridstack_cell_height' tool. Extracts parameters and generates the GridStack 'grid.cellHeight()' JavaScript code using the utility.private async cellHeight(params: CellHeightParams): Promise<string> { const { val, update = true } = params; return this.utils.generateGridStackCode("cellHeight", { value: val, update, code: val !== undefined ? `grid.cellHeight(${ typeof val === "string" ? `'${val}'` : val }, ${update});` : `grid.cellHeight();`, }); }
- src/types.ts:234-237 (schema)TypeScript interface defining the input parameters for the gridstack_cell_height tool.export interface CellHeightParams { val?: number | string; update?: boolean; }
- src/utils/gridstack-utils.ts:16-27 (helper)Helper utility method used by the handler to format and generate the standardized response including code, description, example, and notes for the cellHeight operation.generateGridStackCode(operation: string, params: any): string { const result: GridStackCodeResult = { operation, parameters: params, code: params.code || "", description: this.getOperationDescription(operation), example: this.getOperationExample(operation), notes: this.getOperationNotes(operation), }; return this.formatResponse(result); }