Skip to main content
Glama

gridstack_destroy

Remove a GridStack.js dashboard layout instance from the DOM, optionally deleting all associated HTML elements to clean up resources.

Instructions

Destroy the grid instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
removeDOMNoRemove DOM elements

Implementation Reference

  • Registration of the gridstack_destroy tool in the listTools() method, including name, description, and input schema.
    { name: "gridstack_destroy", description: "Destroy the grid instance", inputSchema: { type: "object", properties: { removeDOM: { type: "boolean", description: "Remove DOM elements", default: false, }, }, }, },
  • Dispatch registration in the callTool switch statement that maps gridstack_destroy calls to the destroy handler method.
    case "gridstack_destroy": return this.destroy(args as DestroyParams);
  • The handler function for gridstack_destroy that generates JavaScript code to destroy the GridStack instance, optionally removing DOM elements.
    private async destroy(params: DestroyParams): Promise<string> { const { removeDOM = false } = params; return this.utils.generateGridStackCode("destroy", { removeDOM, code: `grid.destroy(${removeDOM});`, }); }

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