Skip to main content
Glama

gridstack_off

Remove event listeners from GridStack.js dashboard widgets to manage event handling and optimize performance.

Instructions

Remove event listener

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventNameYesEvent name to remove listener for

Implementation Reference

  • The core handler function for the gridstack_off tool. It destructures the eventName from the input parameters and uses GridStackUtils to generate executable JavaScript code that calls grid.off(eventName) to remove the specified event listener from the GridStack grid instance.
    private async removeEventListener(params: any): Promise<string> {
      const { eventName } = params;
    
      return this.utils.generateGridStackCode("removeEventListener", {
        eventName,
        code: `grid.off('${eventName}');`,
      });
    }
  • The input schema and tool registration for gridstack_off, defining the name, description, and required eventName parameter with an enum of valid GridStack event names.
    {
      name: "gridstack_off",
      description: "Remove event listener",
      inputSchema: {
        type: "object",
        required: ["eventName"],
        properties: {
          eventName: {
            type: "string",
            enum: [
              "added",
              "change",
              "disable",
              "drag",
              "dragstart",
              "dragstop",
              "dropped",
              "enable",
              "removed",
              "resize",
              "resizestart",
              "resizestop",
            ],
            description: "Event name to remove listener for",
          },
        },
      },
    },
  • The dispatch case in the central callTool switch statement that routes gridstack_off calls to the removeEventListener handler.
    case "gridstack_off":
      return this.removeEventListener(args);
  • Documentation reference to the gridstack_off tool in the API documentation markdown.
    - \`gridstack_off\` - Remove event listener
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without behavioral details. It doesn't disclose what happens if the listener doesn't exist, whether this affects grid/widget functionality, or any side effects. The description is minimal and lacks context about the operation's impact.

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 extremely concise with just three words, front-loading the core action. There is zero waste or redundancy, making it easy to parse quickly. It efficiently communicates the tool's purpose in minimal space.

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 tool's complexity (removing event listeners in a gridstack context) and lack of annotations/output schema, the description is incomplete. It doesn't explain what 'event listener' refers to, the context (e.g., grid or widget), or behavioral outcomes. More detail is needed for adequate understanding.

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?

The description adds no parameter semantics beyond what the input schema provides. The schema has 100% coverage with a clear enum for 'eventName', so the baseline is 3. The description doesn't explain what these events represent or provide additional context about parameter usage.

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 'Remove event listener' clearly states the action (remove) and target (event listener), which is specific and unambiguous. However, it doesn't differentiate from sibling tools like 'gridstack_on' (which presumably adds listeners) or explain what type of event listener is being removed (e.g., from a gridstack widget/grid).

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. It doesn't mention prerequisites (e.g., must have added a listener first), when not to use it, or refer to sibling tools like 'gridstack_on' for adding listeners. Usage is implied but not explicitly stated.

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