Skip to main content
Glama
pab1it0

Chess.com MCP Server

get_titled_players

Retrieve a list of chess players holding a specific title from Chess.com's database to identify titled competitors for analysis or verification.

Instructions

Get a list of titled players from Chess.com

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes

Implementation Reference

  • The MCP tool handler for get_titled_players. Validates the chess title input and makes an API request to Chess.com's titled players endpoint.
    @mcp.tool(description="Get a list of titled players from Chess.com")
    async def get_titled_players(title: str) -> Dict[str, Any]:
        """
        Get a list of titled players from Chess.com.
    
        Args:
            title: Chess title (GM, WGM, IM, WIM, FM, WFM, NM, WNM, CM, WCM)
    
        Returns:
            List of titled players
    
        Raises:
            ValueError: If the title is not valid
        """
        valid_titles = ["GM", "WGM", "IM", "WIM", "FM", "WFM", "NM", "WNM", "CM", "WCM"]
        if title not in valid_titles:
            error_msg = f"Invalid title. Must be one of: {', '.join(valid_titles)}"
            logger.error("Invalid title provided", title=title, valid_titles=valid_titles)
            raise ValueError(error_msg)
    
        logger.info("Fetching titled players", title=title)
        return await make_api_request(f"titled/{title}")

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/pab1it0/chess-mcp'

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