Skip to main content
Glama

game_open

Open a specific cell in a Minesweeper game by providing coordinates to reveal its content and progress gameplay.

Instructions

Open a cell in a game.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
public_idYes
xYes
yYes

Implementation Reference

  • The handler function for "game_open" validates input arguments and calls the rails.openCell method.
    async (input) => {
      const publicId = requireString(
        (input as { public_id?: unknown })?.public_id,
        "public_id"
      );
      const { x, y } = requireCoordinates(input);
      return rails.openCell(publicId, x, y);
    }
  • The schema definition for "game_open", defining input properties and required fields.
    {
      name: "game_open",
      description: "Open a cell in a game.",
      inputSchema: {
        type: "object",
        properties: {
          public_id: { type: "string" },
          x: { type: "integer" },
          y: { type: "integer" },
        },
        required: ["public_id", "x", "y"],
      },
  • Registration of the "game_open" tool using the addTool helper.
    addTool(
      {
        name: "game_open",
        description: "Open a cell in a game.",
        inputSchema: {
          type: "object",
          properties: {
            public_id: { type: "string" },
            x: { type: "integer" },
            y: { type: "integer" },
          },
          required: ["public_id", "x", "y"],
        },
      },
      async (input) => {
        const publicId = requireString(
          (input as { public_id?: unknown })?.public_id,
          "public_id"
        );
        const { x, y } = requireCoordinates(input);
        return rails.openCell(publicId, x, y);
      }
    ),

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/geeknees/minesweeper-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server