user_games
Retrieve public Minesweeper games for a specific user by providing their user slug to view game history and current status.
Instructions
List public games for a user slug.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_slug | No |
Implementation Reference
- src/tools/handlers.ts:168-176 (handler)The handler function for the user_games tool, which validates the user_slug and calls rails.listGames.
async (input) => { const userSlug = requireStringOrEnv( (input as { user_slug?: unknown })?.user_slug, "user_slug", process.env.MINESWEEPER_USER_SLUG, "MINESWEEPER_USER_SLUG" ); return rails.listGames(userSlug); } - src/tools/handlers.ts:158-166 (schema)The tool definition for user_games, including the name, description, and input schema.
{ name: "user_games", description: "List public games for a user slug.", inputSchema: { type: "object", properties: { user_slug: { type: "string" }, }, }, - src/tools/handlers.ts:157-177 (registration)The registration of the user_games tool within the createTools function.
addTool( { name: "user_games", description: "List public games for a user slug.", inputSchema: { type: "object", properties: { user_slug: { type: "string" }, }, }, }, async (input) => { const userSlug = requireStringOrEnv( (input as { user_slug?: unknown })?.user_slug, "user_slug", process.env.MINESWEEPER_USER_SLUG, "MINESWEEPER_USER_SLUG" ); return rails.listGames(userSlug); } ),