gridstack_enable
Activate or deactivate the grid system to control widget layout functionality within dashboard interfaces.
Instructions
Enable or disable the grid
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doEnable | No | Enable (true) or disable (false) the grid |
Implementation Reference
- src/tools/index.ts:1025-1032 (handler)The main handler function that executes the gridstack_enable tool. It destructures the doEnable parameter and generates GridStack code to either enable or disable the grid instance using grid.enable() or grid.disable().private async enable(params: EnableParams): Promise<string> { const { doEnable = true } = params; return this.utils.generateGridStackCode("enable", { doEnable, code: doEnable ? `grid.enable();` : `grid.disable();`, }); }
- src/tools/index.ts:445-458 (registration)Tool registration in the listTools() method, defining the name, description, and input schema for the gridstack_enable tool.{ name: "gridstack_enable", description: "Enable or disable the grid", inputSchema: { type: "object", properties: { doEnable: { type: "boolean", description: "Enable (true) or disable (false) the grid", default: true, }, }, }, },
- src/tools/index.ts:810-811 (handler)Dispatcher case in the callTool switch statement that routes gridstack_enable calls to the enable handler method.case "gridstack_enable": return this.enable(args as EnableParams);
- src/tools/index.ts:448-457 (schema)Input schema definition specifying the expected boolean parameter doEnable with default true.inputSchema: { type: "object", properties: { doEnable: { type: "boolean", description: "Enable (true) or disable (false) the grid", default: true, }, }, },