Skip to main content
Glama

gridstack_destroy

Remove a grid instance and optionally delete its DOM elements to clean up dashboard layouts and free system resources when no longer needed.

Instructions

Destroy the grid instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
removeDOMNoRemove DOM elements

Implementation Reference

  • The handler function that implements the core logic for the gridstack_destroy tool. It destructures the removeDOM parameter and uses GridStackUtils to generate the JavaScript code `grid.destroy(removeDOM)` for destroying the grid instance.
    private async destroy(params: DestroyParams): Promise<string> { const { removeDOM = false } = params; return this.utils.generateGridStackCode("destroy", { removeDOM, code: `grid.destroy(${removeDOM});`, }); }
  • The schema definition for the gridstack_destroy tool, including inputSchema with the removeDOM boolean parameter (default false). This is part of the tools returned by listTools().
    { name: "gridstack_destroy", description: "Destroy the grid instance", inputSchema: { type: "object", properties: { removeDOM: { type: "boolean", description: "Remove DOM elements", default: false, }, }, }, },
  • The registration and dispatch point in the callTool switch statement, mapping the tool name to the destroy handler function.
    case "gridstack_destroy": return this.destroy(args as DestroyParams);

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