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
| Name | Required | Description | Default |
|---|---|---|---|
| public_id | Yes | ||
| x | Yes | ||
| y | Yes |
Implementation Reference
- src/tools/handlers.ts:82-89 (handler)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); } - src/tools/handlers.ts:69-80 (schema)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"], }, - src/tools/handlers.ts:68-90 (registration)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); } ),