Skip to main content
Glama

gridstack_save

Save dashboard grid layouts to JSON format with options to include widget content and grid configuration settings for persistence and restoration.

Instructions

Save grid layout to JSON

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveContentNoInclude widget content in save
saveGridOptNoInclude grid options in save

Implementation Reference

  • The core handler method that generates JavaScript code calling grid.save() to serialize the GridStack layout to JSON, using the provided saveContent and saveGridOpt parameters.
    private async save(params: SaveGridParams): Promise<string> { const { saveContent = true, saveGridOpt = false } = params; return this.utils.generateGridStackCode("save", { saveContent, saveGridOpt, code: `const layout = grid.save(${saveContent}, ${saveGridOpt});`, }); }
  • Tool registration object defining the name, description, and input schema for the gridstack_save tool, returned by the listTools() method.
    name: "gridstack_save", description: "Save grid layout to JSON", inputSchema: { type: "object", properties: { saveContent: { type: "boolean", description: "Include widget content in save", default: true, }, saveGridOpt: { type: "boolean", description: "Include grid options in save", default: false, }, }, }, },
  • TypeScript interface defining the input parameters (saveContent and saveGridOpt) used by the gridstack_save handler.
    export interface SaveGridParams { saveContent?: boolean; saveGridOpt?: boolean; }

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