ot_clear_game
Clear all game state to abandon the current tic-tac-toe journey. Use this tool when a stale game from a previous session is still loaded, then start a new game with ot_new_game.
Instructions
Abandon the current journey and clear all game state. Use this to start fresh — especially useful if a stale game from a previous session is still loaded. After calling this, use ot_new_game to begin a new journey.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/games/oregontrail.ts:1189-1205 (handler)Handler function for the ot_clear_game tool. It clears the global otGame state (sets it to null), reports what was in progress (player name, companion name, day, mile), and prompts to start a new game.
"ot_clear_game", "Abandon the current journey and clear all game state. Use this to start fresh — especially useful if a stale game from a previous session is still loaded. After calling this, use ot_new_game to begin a new journey.", {}, async () => { const hadGame = otGame !== null; const summary = hadGame ? `${otGame!.player.name} and ${otGame!.companion.name} were on day ${otGame!.day}, mile ${otGame!.mile} of ${TOTAL_MILES}.` : `No journey was in progress.`; otGame = null; return { content: [{ type: "text", text: `The road goes cold. ${summary}\n\nThe Well at Eldenmoor waits, as it always has. Call ot_new_game to begin again.`, }], }; } ); - src/games/oregontrail.ts:1188-1205 (registration)Registration of ot_clear_game tool via server.tool() with description, empty schema (no params), and async handler.
server.tool( "ot_clear_game", "Abandon the current journey and clear all game state. Use this to start fresh — especially useful if a stale game from a previous session is still loaded. After calling this, use ot_new_game to begin a new journey.", {}, async () => { const hadGame = otGame !== null; const summary = hadGame ? `${otGame!.player.name} and ${otGame!.companion.name} were on day ${otGame!.day}, mile ${otGame!.mile} of ${TOTAL_MILES}.` : `No journey was in progress.`; otGame = null; return { content: [{ type: "text", text: `The road goes cold. ${summary}\n\nThe Well at Eldenmoor waits, as it always has. Call ot_new_game to begin again.`, }], }; } ); - src/games/oregontrail.ts:1189-1191 (schema)Input schema for ot_clear_game — an empty object {} meaning no parameters are required.
"ot_clear_game", "Abandon the current journey and clear all game state. Use this to start fresh — especially useful if a stale game from a previous session is still loaded. After calling this, use ot_new_game to begin a new journey.", {}, - src/index.ts:19-19 (registration)Registration of the Oregon Trail module (including ot_clear_game) via registerOregonTrailTools(server) call.
registerOregonTrailTools(server);