Skip to main content
Glama

get_game

Retrieve comprehensive game details including categories and configuration data from the Lutris Linux gaming library database.

Instructions

Get full details for a specific game including categories and YAML config

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoGame ID
slugNoGame slug

Implementation Reference

  • The handler for the "get_game" tool, which retrieves game details by id or slug, fetches associated categories, reads the game configuration, and returns the combined information.
    server.tool(
      "get_game",
      "Get full details for a specific game including categories and YAML config",
      {
        id: z.coerce.number().optional().describe("Game ID"),
        slug: z.string().optional().describe("Game slug"),
      },
      async (params) => {
        try {
          if (!params.id && !params.slug) {
            return {
              content: [{ type: "text", text: "Provide either id or slug." }],
              isError: true,
            };
          }
    
          const game = params.id ? getGameById(params.id) : getGameBySlug(params.slug!);
          if (!game) {
            return {
              content: [{ type: "text", text: `Game not found.` }],
              isError: true,
            };
          }
    
          const categories = getGameCategories(game.id);
          const config = readGameConfig(game.configpath);
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify({ ...game, categories, config }, null, 2),
              },
            ],
          };
        } catch (error) {
          return handleError(error);
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Praeses0/lutris-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server