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

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

No annotations are provided, so the description carries the full burden. 'Destroy' implies a destructive operation, but it doesn't specify whether this is irreversible, what permissions are needed, or how it interacts with other grid components. This is a significant gap for a tool with potential side effects.

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, direct sentence with no wasted words. It's front-loaded and efficiently conveys the core action, making it highly concise and well-structured for its purpose.

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 lack of annotations and output schema, and the description's minimal detail, this is incomplete for a destructive tool. It doesn't explain what 'destroy' means in practice, potential impacts, or return values, leaving the agent with insufficient context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage and only one optional parameter ('removeDOM'), the schema fully documents the input. The description adds no parameter information, but since there are zero required parameters and high schema coverage, the baseline is high. A 4 reflects that the description doesn't need to compensate for gaps.

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 'Destroy the grid instance' clearly states the action (destroy) and target (grid instance), which is better than a tautology. However, it lacks specificity about what 'destroy' entails and doesn't differentiate from sibling tools like 'gridstack_remove_all' or 'gridstack_remove_widget', making it somewhat vague.

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?

The description provides no guidance on when to use this tool versus alternatives such as 'gridstack_remove_all' or 'gridstack_remove_widget'. It doesn't mention prerequisites, consequences, or typical scenarios for destruction, leaving the agent without context for selection.

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