Skip to main content
Glama

search_service_games

Search for games across external platforms like Steam and GOG that are synced with Lutris gaming library.

Instructions

Search games from external services (Steam, GOG, etc.) synced in Lutris

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch by name or app ID
serviceNoService to search (e.g. steam)steam
limitNoResults per page
offsetNoOffset for pagination

Implementation Reference

  • The MCP tool handler for "search_service_games" which parses inputs and executes the database query.
    async (params) => {
      try {
        const result = searchServiceGames(params);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                { total: result.total, count: result.games.length, games: result.games },
                null,
                2
              ),
            },
          ],
        };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
      }
    }
  • Tool registration for "search_service_games" in the MCP server.
    server.tool(
      "search_service_games",
      "Search games from external services (Steam, GOG, etc.) synced in Lutris",
      {
        query: z.string().optional().describe("Search by name or app ID"),
        service: z.string().default("steam").describe("Service to search (e.g. steam)"),
        limit: z.coerce.number().min(1).max(100).default(25).describe("Results per page"),
        offset: z.coerce.number().min(0).default(0).describe("Offset for pagination"),
      },
  • The actual database query implementation for "search_service_games".
    export function searchServiceGames(
      opts: SearchServiceGamesOptions
    ): { games: ServiceGame[]; total: number } {
      const db = getDatabase();
      const conditions: string[] = ["service = :service"];
      const params: Record<string, unknown> = { service: opts.service };
    
      if (opts.query) {
        conditions.push("(name LIKE :query OR appid LIKE :query)");
        params.query = `%${opts.query}%`;
      }
    
      const where = `WHERE ${conditions.join(" AND ")}`;
    
      const countRow = db
        .prepare(`SELECT COUNT(*) as count FROM service_games ${where}`)
        .get(params) as { count: number };
    
      const games = db
        .prepare(
          `SELECT * FROM service_games ${where} ORDER BY name ASC LIMIT :limit OFFSET :offset`
        )
        .all({ ...params, limit: opts.limit, offset: opts.offset }) as ServiceGame[];
    
      return { games, total: countRow.count };
    }
  • The input schema/interface for the "search_service_games" query.
    export interface SearchServiceGamesOptions {
      query?: string;
      service: string;
      limit: number;
      offset: number;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the search scope but doesn't disclose behavioral traits such as rate limits, authentication needs, error handling, or what 'synced in Lutris' entails operationally. This leaves gaps in understanding how the tool behaves beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. It earns its place by clearly stating the tool's function and scope, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters with full schema coverage but no output schema and no annotations, the description is minimally adequate. It covers the 'what' but lacks context on 'how' (e.g., return format, pagination behavior, or error cases), leaving the agent with incomplete information for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain 'service' options like 'steam' or 'GOG' in more detail). Baseline 3 is appropriate as the schema handles parameter semantics adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search games') and the resource ('from external services synced in Lutris'), specifying the scope. It distinguishes from siblings like 'list_games' by focusing on external services rather than the local library, though it doesn't explicitly contrast them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'list_games' or 'get_game'. The description implies usage for searching external services, but lacks explicit context, prerequisites, or exclusions, leaving the agent to infer based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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