Skip to main content
Glama

gridstack_get_margin

Retrieve current margin values from GridStack.js layouts to maintain consistent spacing between grid elements and ensure proper widget alignment in dashboard designs.

Instructions

Get current margin values

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'gridstack_get_margin' tool. It generates a standardized code snippet and documentation using GridStackUtils to execute `grid.getMargin()` and retrieve the current grid margin values.
    private async getMargin(): Promise<string> { return this.utils.generateGridStackCode("getMargin", { code: `const margin = grid.getMargin();`, }); }
  • Input schema definition for the tool in listTools(). The tool requires no input parameters.
    { name: "gridstack_get_margin", description: "Get current margin values", inputSchema: { type: "object", properties: {}, }, },
  • Registration of the tool in the callTool switch dispatcher, routing calls to the getMargin handler method.
    case "gridstack_get_margin": return this.getMargin();

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