Skip to main content
Glama
pab1it0

Chess.com MCP Server

get_club_profile

Retrieve detailed information about a Chess.com club, including member count and club details, using the club's URL identifier.

Instructions

Get information about a club on Chess.com

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
url_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual tool handler for get_club_profile. It is an async function decorated with @mcp.tool, taking a url_id parameter and calling make_api_request(f'club/{url_id}') to fetch club profile data from the Chess.com API.
    async def get_club_profile(url_id: str) -> Dict[str, Any]:
        """
        Get information about a club on Chess.com.
    
        Args:
            url_id: The URL identifier of the club
    
        Returns:
            Club profile data
        """
        logger.info("Fetching club profile", url_id=url_id)
        return await make_api_request(f"club/{url_id}")
  • The tool is registered via the @mcp.tool decorator on the get_club_profile function, with description 'Get information about a club on Chess.com'.
    @mcp.tool(description="Get information about a club on Chess.com")
  • The make_api_request helper function that get_club_profile relies on. It constructs the URL using the base Chess.com API URL and endpoint, makes an async HTTP GET request via httpx, and returns the JSON response as a dict.
    async def make_api_request(
        endpoint: str,
        params: Optional[Dict[str, Any]] = None,
        accept_json: bool = True
    ) -> Union[Dict[str, Any], str]:
        """
        Make a request to the Chess.com API.
    
        Args:
            endpoint: The API endpoint to request
            params: Optional query parameters
            accept_json: Whether to accept JSON response (True) or PGN (False)
    
        Returns:
            JSON response as dict or text response as string
    
        Raises:
            httpx.HTTPError: If the request fails
        """
        url = f"{config.base_url}/{endpoint}"
        headers = {
            "accept": "application/json" if accept_json else "application/x-chess-pgn"
        }
    
        logger.debug(
            "Making API request",
            endpoint=endpoint,
            url=url,
            accept_json=accept_json,
            has_params=params is not None
        )
    
        async with httpx.AsyncClient() as client:
            try:
                response = await client.get(url, headers=headers, params=params or {})
                response.raise_for_status()
    
                if accept_json:
                    result = response.json()
                    logger.debug("API request successful", endpoint=endpoint, response_type="json")
                    return result
                else:
                    result = response.text
                    logger.debug("API request successful", endpoint=endpoint, response_type="text")
                    return result
    
            except httpx.HTTPError as e:
                logger.error(
                    "API request failed",
                    endpoint=endpoint,
                    url=url,
                    error=str(e),
                    error_type=type(e).__name__
                )
                raise
  • The input schema is defined by the function signature parameter 'url_id: str' - the URL identifier of the club. The return type is Dict[str, Any].
    async def get_club_profile(url_id: str) -> Dict[str, Any]:
Behavior2/5

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

No annotations provided. The description implies a read-only operation ('Get information'), but fails to disclose any behavioral traits like required permissions, rate limits, or data scope beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single-sentence description is concise but lacks additional structuring or front-loading of key details. It is adequate but could benefit from expanding on the parameter and usage.

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?

With an output schema present, the return format is covered. However, given the tool has only one parameter and moderate complexity, the description provides minimal additional context about the tool's functionality.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain the meaning of the 'url_id' parameter (e.g., it is the club's URL identifier). This leaves the parameter ambiguous.

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 it gets information about a club on Chess.com, with a specific verb and resource. It distinguishes from siblings like get_club_members which retrieves members, not profile 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 guidance on when to use this tool versus alternatives such as get_club_members. The description lacks context for appropriate usage scenarios.

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

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