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);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Enable or disable') but lacks details on effects (e.g., whether this changes widget layout dynamically, requires specific permissions, or has side effects). This is a significant gap for a mutation tool with zero annotation coverage.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and every word earns its place, making it easy to parse quickly.

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 mutation nature (enabling/disabling), no annotations, and no output schema, the description is incomplete. It doesn't explain what floating widgets are, how this affects the grid, or what the return value might be, leaving gaps in understanding the tool's full context and behavior.

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 schema description coverage is 100%, with the parameter 'val' clearly documented in the schema as a boolean for enabling/disabling floating. The description doesn't add any meaning beyond this, but since the schema fully covers the single parameter, a baseline score of 3 is appropriate as the description doesn't need to compensate.

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 ('Enable or disable') and target resource ('floating widgets'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'gridstack_get_float' which presumably retrieves the floating status, so it doesn't fully distinguish its specific role within the toolset.

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., needing an initialized grid), exclusions, or how it relates to siblings like 'gridstack_get_float' or 'gridstack_enable', leaving the agent to infer usage context.

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