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

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