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
| Name | Required | Description | Default |
|---|---|---|---|
| public_id | Yes |
Implementation Reference
- src/tools/handlers.ts:149-155 (handler)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); } - src/tools/handlers.ts:137-148 (registration)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"], }, }, - src/rails/client.ts:114-121 (handler)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 ); }