Skip to main content
Glama

gridstack_get_grid_items

Retrieve all items from a GridStack dashboard layout, with option to filter for visible items only.

Instructions

Get all grid items

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
onlyVisibleNoOnly return visible items

Implementation Reference

  • The handler function that implements the core logic of the 'gridstack_get_grid_items' tool. It extracts the 'onlyVisible' parameter and uses GridStackUtils to generate JavaScript code that calls 'grid.getGridItems(onlyVisible)'.
    private async getGridItems(params: GetGridItemsParams): Promise<string> { const { onlyVisible = false } = params; return this.utils.generateGridStackCode("getGridItems", { onlyVisible, code: `const items = grid.getGridItems(${onlyVisible});`, }); }
  • The tool registration entry in the listTools() method, defining the name, description, and input schema.
    { name: "gridstack_get_grid_items", description: "Get all grid items", inputSchema: { type: "object", properties: { onlyVisible: { type: "boolean", description: "Only return visible items", default: false, }, }, }, },
  • TypeScript interface defining the input parameters for the gridstack_get_grid_items tool.
    export interface GetGridItemsParams { onlyVisible?: boolean; }
  • The switch case in callTool() that dispatches to the specific getGridItems handler.
    case "gridstack_get_grid_items": return this.getGridItems(args as GetGridItemsParams);

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