Skip to main content
Glama
pab1it0

Chess.com MCP Server

get_titled_players

Retrieve a list of titled chess players from Chess.com based on a specified title, enabling analysis or interaction with top-tier competitors.

Instructions

Get a list of titled players from Chess.com

Input Schema

NameRequiredDescriptionDefault
titleYes

Input Schema (JSON Schema)

{ "properties": { "title": { "title": "Title", "type": "string" } }, "required": [ "title" ], "title": "get_titled_playersArguments", "type": "object" }

Implementation Reference

  • The main handler function for the 'get_titled_players' tool. It is decorated with @mcp.tool, which registers it and defines the schema via type hints and description. Validates the input title against a list of valid chess titles and fetches the list of titled players from the Chess.com API using make_api_request.
    @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