Skip to main content
Glama

search_steam_games

Find Steam games by name or keywords with single or batch queries. Returns AppID, name, price, and preview image to identify games quickly.

Instructions

Search for Steam games by name or keywords. Supports single or batch queries. Returns basic game information including AppID, name, price, and preview image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSingle search query (game name or keywords)
queriesNoMultiple search queries for batch searching
limitNoMaximum number of results PER QUERY (default: 10, max: 25)

Implementation Reference

  • Primary handler for search_steam_games tool in stdio mode. Validates input using Zod schema, performs single or batch search via steamClient.searchGames(), and returns results as JSON.
    if (name === 'search_steam_games') {
      // Validate input using Zod schema
      const validatedInput = searchGamesSchema.parse(args);
    
      let results: SteamGame[];
    
      if (validatedInput.queries) {
        // Batch search - execute all queries in parallel
        const allResults = await Promise.all(
          validatedInput.queries.map((q) => steamClient.searchGames(q, validatedInput.limit))
        );
        // Flatten results from all queries
        results = allResults.flat();
      } else {
        // Single search
        results = await steamClient.searchGames(validatedInput.query!, validatedInput.limit);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(results, null, 2),
          },
        ],
      };
  • Duplicate handler for search_steam_games tool in SSE (HTTP) mode. Same logic as stdio handler.
    if (name === 'search_steam_games') {
      const validatedInput = searchGamesSchema.parse(args);
      let results: SteamGame[];
    
      if (validatedInput.queries) {
        const allResults = await Promise.all(
          validatedInput.queries.map((q) => steamClient.searchGames(q, validatedInput.limit))
        );
        results = allResults.flat();
      } else {
        results = await steamClient.searchGames(validatedInput.query!, validatedInput.limit);
      }
    
      return {
        content: [{ type: 'text', text: JSON.stringify(results, null, 2) }],
      };
  • Zod schema for validating search_steam_games input. Supports optional 'query' (string), 'queries' (array of 1-5 strings), and 'limit' (1-25). Refines that either query or queries must be provided.
    const searchGamesSchema = z
      .object({
        query: z.string().optional(),
        queries: z.array(z.string()).min(1).max(5).optional(),
        limit: z.number().min(1).max(25).optional(),
      })
      .refine((data) => data.query || data.queries, {
        message: 'Either query or queries must be provided',
      });
  • src/index.ts:32-58 (registration)
    Tool registration/definition for search_steam_games. Declares name, description, and JSON schema input (query, queries, limit).
    {
      name: 'search_steam_games',
      description:
        'Search for Steam games by name or keywords. Supports single or batch queries. Returns basic game information including AppID, name, price, and preview image.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Single search query (game name or keywords)',
          },
          queries: {
            type: 'array',
            items: { type: 'string' },
            description: 'Multiple search queries for batch searching',
            minItems: 1,
            maxItems: 5,
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results PER QUERY (default: 10, max: 25)',
            minimum: 1,
            maximum: 25,
          },
        },
        // Note: Either query OR queries must be provided (validated in Zod)
      },
  • Core helper implementing the actual Steam store search. Scrapes store.steampowered.com/search HTML using cheerio, extracts appId, name, price, image, and release date. Results are cached for 2 hours.
    async searchGames(query: string, limit: number = 10): Promise<SteamGame[]> {
      const cacheKey = `search_${query}_${limit}`;
    
      // Check cache first
      if (this.config.cacheEnabled) {
        const cached = this.cache.get(cacheKey) as SteamGame[] | undefined;
        if (cached !== undefined) {
          return cached;
        }
      }
    
      // Build search URL
      const searchUrl = `https://store.steampowered.com/search/?term=${encodeURIComponent(query)}`;
    
      // Fetch HTML content using the get method for rate limiting and retry
      const html = await this.get<string>(searchUrl);
    
      // Parse HTML with cheerio
      const $ = cheerio.load(html);
      const results: SteamGame[] = [];
    
      // Select search result rows
      $('.search_result_row').each((index, element) => {
        if (results.length >= limit) {
          return false; // Stop iteration when limit reached
        }
    
        const $row = $(element);
    
        // Extract AppID from data attribute
        const appIdStr = $row.attr('data-ds-appid');
        if (!appIdStr) {
          return; // Skip if no AppID
        }
        const appId = parseInt(appIdStr, 10);
        if (isNaN(appId)) {
          return; // Skip if AppID is not a valid number
        }
    
        // Extract game name
        const name = $row.find('.title').text().trim();
    
        // Extract price
        const priceText = $row.find('.search_price').text().trim();
        const priceFormatted = this.parsePriceText(priceText);
    
        // Extract image URL
        const headerImage = $row.find('.search_capsule img').attr('src') || undefined;
    
        // Extract release date (if available)
        const releaseDate = $row.find('.search_released').text().trim() || undefined;
    
        // Build SteamGame object
        const game: SteamGame = {
          appId,
          name,
          headerImage,
          releaseDate,
          priceFormatted,
        };
    
        results.push(game);
      });
    
      // Cache the results
      if (this.config.cacheEnabled) {
        this.cache.set(cacheKey, results, this.config.cacheTTL.gameInfo);
      }
    
      return results;
    }
Behavior3/5

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

With no annotations, the description provides some behavioral detail (batch support, returned fields) but lacks info on rate limits, concurrency, or behavior on no results. Adequate but not comprehensive.

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?

Two concise sentences, front-loaded with core purpose. Every word contributes without redundancy.

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?

No output schema, so description should clarify return structure more. Mentions fields but not format or pagination. Adequate for a simple search tool but incomplete.

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 coverage is 100%, so baseline is 3. The description adds some context ('per query' for limit) but mostly repeats schema descriptions. Minimal added value.

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

Purpose5/5

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

Clearly states verb (search), resource (Steam games), method (by name or keywords), and returned information (AppID, name, price, preview image). Distinct from sibling tools like analyze_reviews or get_game_info.

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 explicit guidance on when to use this tool versus alternatives. While it mentions single or batch queries, there is no advice on when to choose batch over single or situations where this tool is inappropriate.

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/jhomen368/steam-reviews-mcp'

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