Skip to main content
Glama

Search Games

search_games

Find video games in the IGDB database by entering search terms, retrieving details like ratings, release dates, and platforms.

Instructions

Search for games in the IGDB database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term for finding games
fieldsNoComma-separated list of fields to returnname,rating,rating_count,first_release_date,platforms.name
limitNoMaximum number of results to return

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Registration of the 'search_games' tool using the @mcp.tool decorator, specifying name, title, and description.
    @mcp.tool(
        name="search_games",
        title="Search Games",
        description="Search for games in the IGDB database"
    )
  • The handler function implementing the logic for 'search_games': constructs an Apicalypse search query for the IGDB games endpoint and executes it via the IGDB client.
    async def search_games(
        query: Annotated[str, Field(description="Search term for finding games")],
        ctx: Context,
        fields: Annotated[
            str, Field(description="Comma-separated list of fields to return")
        ] = "name,rating,rating_count,first_release_date,platforms.name",
        limit: Annotated[
            int, Field(description="Maximum number of results to return", ge=1, le=500)
        ] = 10,
    ) -> List[Dict[str, Any]]:
        """
        Search for games in the IGDB database.
    
        Args:
            query: Search term for finding games
            ctx: Context for accessing session configuration
            fields: Comma-separated list of fields to return
            limit: Maximum number of results to return (default: 10, max: 500)
    
        Returns:
            List of games matching the search criteria
        """
        igdb_client = get_igdb_client(ctx)
    
        search_query = f'search "{query}"; fields {fields}; limit {limit};'
        return await igdb_client.make_request("games", search_query)
  • Input schema definitions for the search_games tool parameters using Pydantic Field annotations, including descriptions, defaults, and constraints.
        query: Annotated[str, Field(description="Search term for finding games")],
        ctx: Context,
        fields: Annotated[
            str, Field(description="Comma-separated list of fields to return")
        ] = "name,rating,rating_count,first_release_date,platforms.name",
        limit: Annotated[
            int, Field(description="Maximum number of results to return", ge=1, le=500)
        ] = 10,
    ) -> List[Dict[str, Any]]:
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool searches for games but doesn't describe key behaviors such as how results are sorted, whether it's paginated, if there are rate limits, or what authentication might be required. This leaves significant gaps for an agent to understand operational constraints.

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: 'Search for games in the IGDB database'. It's front-loaded with the core action and resource, with no unnecessary words or redundancy. Every part of the sentence contributes directly to understanding the tool's purpose.

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 the tool's moderate complexity (3 parameters, 1 required) and the presence of an output schema (which handles return values), the description is minimally adequate. However, it lacks context on behavioral traits (e.g., sorting, pagination) and usage guidelines relative to siblings, making it incomplete for optimal agent decision-making despite the structured support.

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?

The description adds no parameter-specific information beyond what's already in the input schema, which has 100% coverage with clear descriptions for 'query', 'fields', and 'limit'. Since schema coverage is high, the baseline score is 3, as the description doesn't compensate with additional semantics like example queries or field usage tips.

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 tool's purpose: 'Search for games in the IGDB database'. It specifies the verb ('search') and resource ('games'), and identifies the database context. However, it doesn't explicitly differentiate from sibling tools like 'custom_query' or 'get_most_anticipated_games', which likely also involve game searches or queries.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'custom_query' (which might offer more flexible queries) or 'get_game_details' (which might retrieve specific game information), nor does it specify contexts where this search is preferred over others. Usage is implied but not articulated.

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/bielacki/igdb-mcp-server'

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