Skip to main content
Glama

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
NameRequiredDescriptionDefault
breakpointsYesArray of breakpoint configurations

Implementation Reference

  • 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)});`, });
  • 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", }, }, }, },
  • Dispatch/registration in the callTool switch statement that routes execution to the setResponsive handler.
    case "gridstack_set_responsive": return this.setResponsive(args as ResponsiveParams);
  • TypeScript interface defining the input parameters for the tool, matching the JSON schema.
    export interface ResponsiveParams { breakpoints: Breakpoint[]; }
  • TypeScript interface for individual breakpoint objects used in ResponsiveParams.
    export interface Breakpoint { w: number; c: number; }

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