Skip to main content
Glama

gridstack_column

Change the number of columns in dynamic dashboard layouts to adjust widget positioning and grid structure for responsive design.

Instructions

Change the number of columns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnYesNumber of columns or 'auto'
layoutNoHow to re-layout widgetsmoveScale

Implementation Reference

  • The core handler function that executes the gridstack_column tool logic. It generates JavaScript code calling GridStack's grid.column() method with the provided column count and layout, formatted via GridStackUtils.
    private async column(params: ColumnParams): Promise<string> { const { column, layout = "moveScale" } = params; return this.utils.generateGridStackCode("column", { column, layout, code: `grid.column(${ typeof column === "string" ? `'${column}'` : column }, '${layout}');`, }); }
  • JSON schema defining the input parameters for the gridstack_column tool: required 'column' (number or 'auto'), optional 'layout'.
    inputSchema: { type: "object", required: ["column"], properties: { column: { oneOf: [{ type: "number" }, { type: "string", enum: ["auto"] }], description: "Number of columns or 'auto'", }, layout: { type: "string", enum: ["moveScale", "move", "scale", "none", "list"], description: "How to re-layout widgets", default: "moveScale", }, }, },
  • Tool registration object in listTools() array, defining name, description, and input schema for MCP tool discovery.
    { name: "gridstack_column", description: "Change the number of columns", inputSchema: { type: "object", required: ["column"], properties: { column: { oneOf: [{ type: "number" }, { type: "string", enum: ["auto"] }], description: "Number of columns or 'auto'", }, layout: { type: "string", enum: ["moveScale", "move", "scale", "none", "list"], description: "How to re-layout widgets", default: "moveScale", }, }, }, },
  • Switch case in callTool() method that dispatches execution of gridstack_column to the dedicated handler function.
    case "gridstack_column": return this.column(args as ColumnParams);

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