Skip to main content
Glama

gridstack_is_area_empty

Check if a specific grid area is empty by providing coordinates and dimensions to verify widget placement availability.

Instructions

Check if an area is empty

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX position
yYesY position
wYesWidth
hYesHeight

Implementation Reference

  • The handler function that implements the core logic for the gridstack_is_area_empty tool by generating the appropriate GridStack JavaScript code call.
    private async isAreaEmpty(params: any): Promise<string> { const { x, y, w, h } = params; return this.utils.generateGridStackCode("isAreaEmpty", { area: { x, y, w, h }, code: `const isEmpty = grid.isAreaEmpty(${x}, ${y}, ${w}, ${h});`, }); }
  • Registration of the tool in the listTools() method, defining its name, description, and input schema.
    { name: "gridstack_is_area_empty", description: "Check if an area is empty", inputSchema: { type: "object", required: ["x", "y", "w", "h"], properties: { x: { type: "number", description: "X position" }, y: { type: "number", description: "Y position" }, w: { type: "number", description: "Width" }, h: { type: "number", description: "Height" }, }, }, },
  • Switch case in callTool() method that dispatches execution to the specific handler for this tool.
    case "gridstack_is_area_empty": return this.isAreaEmpty(args);

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