Skip to main content
Glama

gridstack_get_column

Retrieve the current column count in a GridStack layout to monitor grid structure and ensure responsive design alignment.

Instructions

Get current number of columns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'gridstack_get_column' that generates JavaScript code to retrieve the current number of columns from the GridStack grid instance using grid.column().
    private async getColumn(): Promise<string> {
      return this.utils.generateGridStackCode("getColumn", {
        code: `const columns = grid.column();`,
      });
    }
  • Registration of the tool in the callTool switch statement, routing calls to the getColumn handler method.
    case "gridstack_get_column":
      return this.getColumn();
  • Tool registration in listTools(), defining the name, description, and input schema (empty object) for the gridstack_get_column tool.
    {
      name: "gridstack_get_column",
      description: "Get current number of columns",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Input schema definition for the tool, specifying an empty object (no parameters required).
    inputSchema: {
      type: "object",
      properties: {},
    },
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 states a read operation ('Get'), implying it's likely non-destructive, but doesn't specify if it requires initialization, returns a numeric value, or has any side effects. This leaves gaps in understanding the tool's behavior.

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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with 0 parameters and no output schema, the description is minimally adequate. However, without annotations or output details, it lacks information on return type (e.g., integer, object) or any behavioral context, which could be helpful given the complexity implied by sibling tools.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate, but it could theoretically mention implicit dependencies (e.g., grid context). Baseline is 4 for zero parameters.

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 verb 'Get' and the resource 'current number of columns', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'gridstack_column' or 'gridstack_get_cell_height', which might have overlapping or related functionality, preventing a perfect score.

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. Given sibling tools like 'gridstack_column' (which might set or modify columns) and 'gridstack_get_grid_items' (which retrieves grid data), there's no indication of context, prerequisites, or exclusions for usage.

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