Skip to main content
Glama

gridstack_column

Adjust the column count in GridStack layouts to control widget arrangement and responsiveness. Specify a number or 'auto' to optimize dashboard grid structure.

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 for the 'gridstack_column' tool. It destructures the input parameters (column count and optional layout strategy), constructs the GridStack 'column' method call as a string, and delegates to GridStackUtils.generateGridStackCode to format the response.
    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}');`,
      });
    }
  • Tool registration in GridStackTools.listTools(). Defines the tool name, description, and input schema for validating parameters like column count and layout option.
    {
      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",
          },
        },
      },
    },
  • TypeScript interface defining the input parameters for the gridstack_column tool, used for type safety in the handler.
    export interface ColumnParams {
      column: number | "auto";
      layout?: ColumnOptions;
    }
  • Switch case in GridStackTools.callTool() that routes calls to the specific column handler method.
    case "gridstack_column":
      return this.column(args as ColumnParams);
  • Invocation of the shared helper GridStackUtils.generateGridStackCode specific to column operation, which formats the response with description, example, and notes.
      return this.utils.generateGridStackCode("column", {
        column,
        layout,
        code: `grid.column(${
          typeof column === "string" ? `'${column}'` : column
        }, '${layout}');`,
      });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. 'Change' implies a mutation, but it doesn't disclose behavioral traits such as whether this affects existing widgets, requires specific permissions, has side effects, or how it interacts with other grid operations. This leaves significant gaps for an agent to understand the tool's impact.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of grid manipulation and lack of annotations or output schema, the description is incomplete. It doesn't explain what 'changing columns' entails (e.g., reflowing widgets, visual updates), potential errors, or return values. For a mutation tool in a rich sibling set, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter semantics beyond what the input schema provides. With 100% schema description coverage, the schema already documents the 'column' parameter (number or 'auto') and 'layout' parameter (enum with default). The baseline score of 3 is appropriate as the schema does the heavy lifting, but the description doesn't enhance understanding of parameter usage or implications.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Change') and resource ('number of columns'), making it immediately understandable. However, it doesn't distinguish this from sibling tools like 'gridstack_get_column' or 'gridstack_set_responsive', which might also relate to column configuration.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'gridstack_get_column' (likely for reading) and 'gridstack_set_responsive' (possibly for responsive behavior), there's no indication of context, prerequisites, or exclusions for this column-changing operation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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