Skip to main content
Glama

gridstack_float

Enable or disable floating widgets in GridStack.js dashboards to control widget positioning and overlay behavior.

Instructions

Enable or disable floating widgets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valNoEnable floating (true) or disable (false)

Implementation Reference

  • The primary handler function that implements the gridstack_float tool logic. It destructures the input parameter 'val' (boolean) and generates JavaScript code to call GridStack's grid.float() method, optionally with the value, using the GridStackUtils helper.
    private async float(params: FloatParams): Promise<string> { const { val } = params; return this.utils.generateGridStackCode("float", { value: val, code: val !== undefined ? `grid.float(${val});` : `grid.float();`, }); }
  • Tool registration in listTools() method, defining the name, description, and input schema for validation.
    { name: "gridstack_float", description: "Enable or disable floating widgets", inputSchema: { type: "object", properties: { val: { type: "boolean", description: "Enable floating (true) or disable (false)", }, }, }, },
  • TypeScript interface defining the input parameters for the gridstack_float tool.
    export interface FloatParams { val?: boolean; }
  • Dispatch registration in the callTool switch statement, routing calls to the float handler method.
    case "gridstack_float": return this.float(args as FloatParams);
  • Supporting utility method used by the handler to format the response with operation-specific descriptions, examples, and notes for the 'float' operation.
    generateGridStackCode(operation: string, params: any): string { const result: GridStackCodeResult = { operation, parameters: params, code: params.code || "", description: this.getOperationDescription(operation), example: this.getOperationExample(operation), notes: this.getOperationNotes(operation), }; return this.formatResponse(result); }

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