Skip to main content
Glama

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
NameRequiredDescriptionDefault
valNoNew cell height (px, 'auto', 'initial', CSS units)
updateNoUpdate existing widgets

Implementation Reference

  • 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, }, }, }, },
  • Tool handler registration in the central callTool switch statement dispatcher.
    case "gridstack_cell_height": return this.cellHeight(args as CellHeightParams);
  • 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();`, }); }
  • TypeScript interface defining the input parameters for the gridstack_cell_height tool.
    export interface CellHeightParams { val?: number | string; update?: boolean; }
  • 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); }

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/raghavsharma-simpplr/gridstack-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server