remove_game
Remove a game from the Lutris database to clean up your library without deleting game files. Use this tool to manage your game collection by removing entries you no longer need.
Instructions
Remove a game from the Lutris database (does not delete files)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Game ID to remove | |
| confirm | Yes | Must be true to confirm deletion |
Implementation Reference
- src/tools/games.ts:204-247 (handler)The implementation of the 'remove_game' tool. It validates the 'confirm' parameter, checks if the game exists, and calls 'deleteGame' to remove it from the database.
server.tool( "remove_game", "Remove a game from the Lutris database (does not delete files)", { id: z.coerce.number().describe("Game ID to remove"), confirm: z.boolean().describe("Must be true to confirm deletion"), }, async (params) => { try { if (!params.confirm) { return { content: [ { type: "text", text: "Set confirm to true to delete the game." }, ], isError: true, }; } const game = getGameById(params.id); if (!game) { return { content: [{ type: "text", text: `Game with id ${params.id} not found.` }], isError: true, }; } deleteGame(params.id); return { content: [ { type: "text", text: JSON.stringify( { message: `Removed "${game.name}" (id: ${game.id}) from library.` }, null, 2 ), }, ], }; } catch (error) { return handleError(error); } } );