Skip to main content
Glama

game_state

Fetch the current public state of a Minesweeper game to track progress, view board layout, and monitor remaining mines.

Instructions

Fetch the public state for a game.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
public_idYes

Implementation Reference

  • The handler for the 'game_state' tool, which extracts the 'public_id' from input and calls rails.getState.
    async (input) => {
      const publicId = requireString(
        (input as { public_id?: unknown })?.public_id,
        "public_id"
      );
      return rails.getState(publicId);
    }
  • The schema definition for the 'game_state' tool.
    inputSchema: {
      type: "object",
      properties: {
        public_id: { type: "string" },
      },
      required: ["public_id"],
    },
  • The registration of the 'game_state' tool via addTool within the createTools function.
    addTool(
      {
        name: "game_state",
        description: "Fetch the public state for a game.",
        inputSchema: {
          type: "object",
          properties: {
            public_id: { type: "string" },
          },
          required: ["public_id"],
        },
      },
      async (input) => {
        const publicId = requireString(
          (input as { public_id?: unknown })?.public_id,
          "public_id"
        );
        return rails.getState(publicId);
      }
    ),

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