Skip to main content
Glama

gridstack_remove_all

Clear all widgets from a GridStack dashboard to reset the layout or prepare for new content.

Instructions

Remove all widgets from the grid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
removeDOMNoRemove DOM elements

Implementation Reference

  • The handler implementation for the 'gridstack_remove_all' tool. It destructures the input params for removeDOM (default true) and uses a utility to generate a code snippet that calls `grid.removeAll(removeDOM)` from the GridStack library.
    private async removeAll(params: any): Promise<string> {
      const { removeDOM = true } = params;
    
      return this.utils.generateGridStackCode("removeAll", {
        removeDOM,
        code: `grid.removeAll(${removeDOM});`,
      });
    }
  • The input schema and metadata for the 'gridstack_remove_all' tool, defining it as part of the tools registry with name, description, and optional boolean parameter 'removeDOM'.
    {
      name: "gridstack_remove_all",
      description: "Remove all widgets from the grid",
      inputSchema: {
        type: "object",
        properties: {
          removeDOM: {
            type: "boolean",
            description: "Remove DOM elements",
            default: true,
          },
        },
      },
    },
  • Registration of the tool handler in the central callTool switch statement, dispatching calls to 'gridstack_remove_all' to the removeAll method.
    case "gridstack_remove_all":
      return this.removeAll(args);

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