Skip to main content
Glama

game_end

Terminate an active Minesweeper game by providing its public identifier to clean up resources and conclude gameplay.

Instructions

End a game.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
public_idYes

Implementation Reference

  • Tool handler for "game_end" which extracts public_id and calls rails.endGame.
    async (input) => {
      const publicId = requireString(
        (input as { public_id?: unknown })?.public_id,
        "public_id"
      );
      return rails.endGame(publicId);
    }
  • Registration of the "game_end" tool with description and input schema.
    addTool(
      {
        name: "game_end",
        description: "End a game.",
        inputSchema: {
          type: "object",
          properties: {
            public_id: { type: "string" },
          },
          required: ["public_id"],
        },
      },
  • Actual implementation of endGame logic, executing the HTTP request to the Rails API.
    async endGame(publicId: string): Promise<GameState> {
      return this.requestJson<GameState>(
        "POST",
        `/games/${encodeURIComponent(publicId)}/end`,
        undefined,
        true
      );
    }

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