Skip to main content
Glama

gridstack_get_float

Retrieve the current floating state of widgets in a GridStack dashboard layout to manage responsive drag-and-drop positioning.

Instructions

Get current float state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'gridstack_get_float' tool. It generates and returns formatted JavaScript code that retrieves the current float mode state from the GridStack instance using `grid.float()` (returns boolean).
    private async getFloat(): Promise<string> {
      return this.utils.generateGridStackCode("getFloat", {
        code: `const floatMode = grid.float();`,
      });
    }
  • Tool registration in listTools(): defines the tool name, description 'Get current float state', and empty input schema (no parameters required).
    {
      name: "gridstack_get_float",
      description: "Get current float state",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Switch case in callTool() method that dispatches the tool call to the getFloat() handler.
    case "gridstack_get_float":
      return this.getFloat();
  • Helper method called by the handler to format the response with operation details, generated code, description, example, and notes.
    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);
    }
  • Description string for the 'getFloat' operation used in response formatting.
        getFloat: "Get current float mode state",
        addGrid: "Create a new grid with options and children (static method)",
      };
    
      return descriptions[operation] || "GridStack operation";
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Get'), but doesn't specify if it requires any permissions, has side effects, returns data in a particular format, or handles errors. For a tool with zero annotation coverage, this lack of detail is a notable shortfall.

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 ('Get current float state'), consisting of a single, front-loaded sentence that directly states the tool's purpose without any fluff. Every word earns its place, making it efficient and easy to parse.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'float state' means, what the return value might be (e.g., a boolean, string, or object), or how it integrates with other GridStack operations. For a tool in a complex system with many siblings, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. A baseline score of 4 is assigned since the schema fully covers the absence of parameters, and 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.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get current float state' clearly indicates a read operation ('Get') on a specific resource ('float state'), which is adequate. However, it doesn't specify what 'float state' refers to in the context of GridStack (e.g., whether it's a global setting, widget property, or layout feature), making it somewhat vague compared to more specific sibling tools like 'gridstack_get_cell_height' or 'gridstack_get_column'.

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, related operations (e.g., if it complements 'gridstack_float'), or typical use cases, leaving the agent to infer usage from the name alone. This is a significant gap given the many sibling tools available.

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