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);
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. It states the action but lacks critical behavioral details: whether this operation is destructive or reversible, if it requires specific permissions, what happens to widget data, or if there are side effects like layout changes. The parameter 'removeDOM' hints at DOM manipulation but isn't explained in the description.

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 zero wasted words, making it highly efficient and front-loaded. It immediately conveys the core action without unnecessary elaboration, perfectly sized for its simple function.

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 no annotations, no output schema, and a mutation tool (implied by 'Remove'), the description is incomplete. It doesn't address behavioral risks, return values, or error conditions, leaving significant gaps for an agent to operate safely and effectively in a grid management context.

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?

Schema description coverage is 100%, with the single parameter 'removeDOM' documented in the schema as 'Remove DOM elements'. The description adds no parameter-specific information beyond what the schema provides, so it meets the baseline of 3 for adequate coverage without adding value.

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

Purpose4/5

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

The description clearly states the action ('Remove') and target ('all widgets from the grid'), making the purpose immediately understandable. It distinguishes itself from sibling 'gridstack_remove_widget' by specifying 'all' widgets rather than a single one. However, it doesn't specify what 'remove' entails operationally (e.g., deletion, detachment, hiding).

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 like 'gridstack_remove_widget' for single widgets or 'gridstack_destroy' for more comprehensive cleanup. There's no mention of prerequisites, consequences, or typical use cases, leaving the agent to infer usage from context 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