get_my_games
Retrieve a paginated list of your tabletop game projects from The Game Crafter, showing name, ID, and current status for each design.
Instructions
List all games for a designer with name, ID, and status. Returns paginated results. Requires a designer_id from get_my_designers. Requires authentication.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| designer_id | Yes | The designer ID to list games for. Get this from the get_my_designers tool. | |
| page_number | No | Page number for pagination (default: 1). |
Implementation Reference
- src/tools/games.ts:4-19 (handler)The `handleGetMyGames` function implements the tool's execution logic by calling the `client.getGames` method.
export function handleGetMyGames(client: TgcClient) { return async (args: { designer_id: string; page_number?: number; }): Promise<CallToolResult> => { const games = await client.getGames(args.designer_id, args.page_number); return { content: [ { type: "text", text: JSON.stringify(games, null, 2), }, ], }; }; } - src/schemas/tool-inputs.ts:26-36 (schema)The `getMyGamesInput` schema defines the `designer_id` (required) and `page_number` (optional) for the tool.
export const getMyGamesInput = { designer_id: safeId.describe( "The designer ID to list games for. Get this from the get_my_designers tool.", ), page_number: z .number() .int() .positive() .optional() .describe("Page number for pagination (default: 1)."), }; - src/index.ts:93-98 (registration)The `get_my_games` tool is registered in `src/index.ts` using `server.registerTool`, linking it to the handler and schema.
server.registerTool("get_my_games", { description: "List all games for a designer with name, ID, and status. Returns paginated results. Requires a designer_id from get_my_designers. Requires authentication.", inputSchema: schemas.getMyGamesInput, annotations: { readOnlyHint: true }, }, withErrorHandling(handleGetMyGames(client)));