Skip to main content
Glama

gridstack_cell_height

Adjust the height of grid cells to customize dashboard layouts, supporting pixel values, CSS units, or automatic sizing.

Instructions

Update cell height

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valNoNew cell height (px, 'auto', 'initial', CSS units)
updateNoUpdate existing widgets

Implementation Reference

  • The handler function that implements the core logic for the 'gridstack_cell_height' tool. It generates the GridStack.js 'cellHeight' method call based on input parameters and uses the GridStackUtils helper to produce executable JavaScript code.
    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();`, }); }
  • The JSON schema defining the input parameters for the 'gridstack_cell_height' tool: 'val' for the new cell height value and optional 'update' boolean.
    { 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, }, }, }, },
  • The switch case in callTool method that registers and dispatches calls to the specific cellHeight handler for the tool name 'gridstack_cell_height'.
    case "gridstack_cell_height": return this.cellHeight(args as CellHeightParams);

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