Skip to main content
Glama

gridstack_float

Control floating behavior for widgets in GridStack dashboards. Enable or disable floating mode to allow widgets to move freely across grid cells for flexible layout arrangements.

Instructions

Enable or disable floating widgets

Input Schema

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

Implementation Reference

  • The main handler function for the 'gridstack_float' tool. It destructures the 'val' parameter and generates JavaScript code to invoke GridStack's 'float' method, either with the provided boolean value or toggling the current state.
    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 definition in listTools(), including the name, description, and input schema for the 'gridstack_float' tool.
    { name: "gridstack_float", description: "Enable or disable floating widgets", inputSchema: { type: "object", properties: { val: { type: "boolean", description: "Enable floating (true) or disable (false)", }, }, }, },
  • Registration in the callTool switch statement that dispatches to the float handler.
    case "gridstack_float": return this.float(args as FloatParams);
  • TypeScript interface defining the input parameters for the gridstack_float tool.
    export interface FloatParams { val?: boolean; }
  • Helper method used by the handler to format and generate the response including code, description, example, 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