gridstack_get_column
Retrieve the current number of columns in a GridStack layout to manage widget positioning and responsive grid structure.
Instructions
Get current number of columns
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:715-722 (schema)Tool schema definition in the listTools() method, specifying the name, description, and empty input schema for the gridstack_get_column tool.{ name: "gridstack_get_column", description: "Get current number of columns", inputSchema: { type: "object", properties: {}, }, },
- src/tools/index.ts:849-850 (registration)Registration in the callTool switch statement that dispatches execution to the getColumn handler method.case "gridstack_get_column": return this.getColumn();
- src/tools/index.ts:1145-1149 (handler)The main handler function implementing the gridstack_get_column tool logic. It generates a formatted response containing the GridStack JavaScript code to retrieve the current number of columns (`grid.column()`).private async getColumn(): Promise<string> { return this.utils.generateGridStackCode("getColumn", { code: `const columns = grid.column();`, }); }