Skip to main content
Glama

gridstack_margin

Adjust grid spacing and gaps between widgets in dashboard layouts using CSS units like px, em, or rem to control visual separation and alignment.

Instructions

Update grid margin/gap

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesMargin value (px or CSS format)
unitNoCSS unit (px, em, rem, etc.)px

Implementation Reference

  • The main handler function that executes the gridstack_margin tool logic. It destructures the input parameters and calls the utility method to generate the GridStack 'margin' method call code.
    private async margin(params: MarginParams): Promise<string> { const { value, unit = "px" } = params; return this.utils.generateGridStackCode("margin", { value, unit, code: `grid.margin(${typeof value === "string" ? `'${value}'` : value});`, }); }
  • The input schema definition for the gridstack_margin tool, specifying required 'value' parameter (number or string) and optional 'unit'.
    { name: "gridstack_margin", description: "Update grid margin/gap", inputSchema: { type: "object", required: ["value"], properties: { value: { oneOf: [{ type: "number" }, { type: "string" }], description: "Margin value (px or CSS format)", }, unit: { type: "string", description: "CSS unit (px, em, rem, etc.)", default: "px", }, }, }, },
  • The switch case in callTool method that registers and routes execution to the margin handler function.
    case "gridstack_margin": return this.margin(args as MarginParams);

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