gridstack_set_responsive
Configure responsive breakpoints to adjust grid column counts based on window width, enabling adaptive dashboard layouts for different screen sizes.
Instructions
Configure responsive breakpoints
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| breakpoints | Yes | Array of breakpoint configurations |
Implementation Reference
- src/tools/index.ts:1052-1058 (handler)Handler function that generates and returns JavaScript code to configure responsive breakpoints on the GridStack instance using grid.setResponsive(breakpoints).private async setResponsive(params: ResponsiveParams): Promise<string> { const { breakpoints } = params; return this.utils.generateGridStackCode("setResponsive", { breakpoints, code: `grid.setResponsive(${JSON.stringify(breakpoints, null, 2)});`, });
- src/tools/index.ts:491-518 (schema)MCP tool registration including name, description, and JSON input schema defining required 'breakpoints' array of objects with 'w' (window width) and 'c' (columns).{ name: "gridstack_set_responsive", description: "Configure responsive breakpoints", inputSchema: { type: "object", required: ["breakpoints"], properties: { breakpoints: { type: "array", items: { type: "object", required: ["w", "c"], properties: { w: { type: "number", description: "Window width breakpoint", }, c: { type: "number", description: "Number of columns at this breakpoint", }, }, }, description: "Array of breakpoint configurations", }, }, }, },
- src/tools/index.ts:819-820 (registration)Dispatch/registration in the callTool switch statement that routes execution to the setResponsive handler.case "gridstack_set_responsive": return this.setResponsive(args as ResponsiveParams);
- src/types.ts:244-246 (schema)TypeScript interface defining the input parameters for the tool, matching the JSON schema.export interface ResponsiveParams { breakpoints: Breakpoint[]; }
- src/types.ts:102-105 (schema)TypeScript interface for individual breakpoint objects used in ResponsiveParams.export interface Breakpoint { w: number; c: number; }