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;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Configure' implies a mutation, but it doesn't disclose behavioral traits such as whether changes are immediate, require specific permissions, affect existing layouts, or have side effects. This is inadequate for a mutation tool with zero annotation coverage.

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 with no wasted words. It's front-loaded and appropriately sized for the tool's apparent complexity, 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 a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on what 'configure' entails, how breakpoints interact with other grid properties, or what the expected outcome is, leaving significant gaps for an AI agent to infer behavior.

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 minimal meaning beyond the input schema, which has 100% coverage. It mentions 'responsive breakpoints', hinting at the 'breakpoints' parameter, but doesn't explain the semantics of 'w' (window width) or 'c' (columns) in context. With high schema coverage, the baseline is 3, as the schema does most of the work.

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

Purpose3/5

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

The description 'Configure responsive breakpoints' states a clear action ('configure') and target ('responsive breakpoints'), but it's vague about what exactly is being configured. It doesn't specify whether this applies to a specific grid, widget, or global settings, nor does it distinguish from siblings like 'gridstack_update_widget' or 'gridstack_batch_update' which might also involve 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?

No guidance is provided on when to use this tool versus alternatives. With many sibling tools like 'gridstack_update_widget' or 'gridstack_batch_update', the description lacks context about prerequisites, timing (e.g., after initialization), or exclusions, leaving the agent to guess based on the name alone.

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