Skip to main content
Glama

get_game_details

Retrieve detailed information about a specific video game from IGDB, including ratings, platforms, genres, release dates, and company involvement.

Instructions

Retrieve detailed information about a specific game from IGDB

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
game_idYesThe IGDB ID of the game
fieldsNoComma-separated list of fields to returnid,slug,name,rating,rating_count,hypes,first_release_date,platforms.name,genres.name,status,cover.url,summary,involved_companies.company.name,involved_companies.developer,involved_companies.publisher

Implementation Reference

  • The main asynchronous handler function that implements the get_game_details tool. It retrieves detailed game information from the IGDB API by game ID using a dynamically constructed query.
    async def get_game_details( game_id: Annotated[int, Field(description="The IGDB ID of the game")], ctx: Context, fields: Annotated[ Optional[str], Field(description="Comma-separated list of fields to return"), ] = "id,slug,name,rating,rating_count,hypes,first_release_date,platforms.name,genres.name,status,cover.url,summary,involved_companies.company.name,involved_companies.developer,involved_companies.publisher", ) -> Dict[str, Any]: """ Get detailed information about a specific game. Args: game_id: The IGDB ID of the game ctx: Context for accessing session configuration fields: Comma-separated list of fields to return (default: all fields) Returns: Detailed information about the game """ igdb_client = get_igdb_client(ctx) query = f"fields {fields}; where id = {game_id};" results = await igdb_client.make_request("games", query) if not results: raise ValueError(f"No game found with ID {game_id}") return results[0]
  • The FastMCP @mcp.tool decorator that registers the get_game_details function as a tool, specifying its name, title, and description.
    @mcp.tool( name="get_game_details", title="Get Game Details", description="Retrieve detailed information about a specific game from IGDB" )
  • Input schema definition using Pydantic's Annotated and Field for parameter validation and documentation (game_id, ctx, fields). The default fields parameter specifies common game details to fetch.
    game_id: Annotated[int, Field(description="The IGDB ID of the game")], ctx: Context, fields: Annotated[ Optional[str], Field(description="Comma-separated list of fields to return"), ] = "id,slug,name,rating,rating_count,hypes,first_release_date,platforms.name,genres.name,status,cover.url,summary,involved_companies.company.name,involved_companies.developer,involved_companies.publisher", ) -> Dict[str, Any]:

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