Skip to main content
Glama
YuchengMaUTK

Unofficial WCA MCP Server

by YuchengMaUTK

get_wca_countries

Retrieve a complete list of countries recognized by the World Cube Association, including names and ISO2 codes for regional filtering in speedcubing data queries.

Instructions

Get all WCA countries.

Returns a list of all countries recognized by the World Cube Association including country names and ISO2 codes used for regional filtering.

Returns: List of WCA countries with names and ISO2 codes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the 'get_wca_countries' tool. Decorated with @mcp.tool() for automatic registration in the FastMCP server. Implements the core logic by fetching countries from WCAAPIClient within an async context manager and propagating errors with descriptive messages.
    @mcp.tool()
    async def get_wca_countries() -> List[Dict[str, Any]]:
        """Get all WCA countries.
        
        Returns a list of all countries recognized by the World Cube Association
        including country names and ISO2 codes used for regional filtering.
        
        Returns:
            List of WCA countries with names and ISO2 codes
        """
        try:
            async with WCAAPIClient() as client:
                countries = await client.get_countries()
                return countries
        except APIError as e:
            raise Exception(f"Failed to fetch WCA countries: {e}")
        except Exception as e:
            raise Exception(f"Unexpected error fetching WCA countries: {e}")
  • Helper method in WCAAPIClient class that makes the HTTP request to the WCA API endpoint 'countries.json', handles response parsing to extract the countries list (preferring 'items' key), and returns it for use by the tool handler.
    async def get_countries(self) -> List[Dict[str, Any]]:
        """Get all countries.
        
        Returns:
            List of country data
        """
        data = await self._make_request("countries.json")
        # The API returns paginated data with items array
        if isinstance(data, dict) and "items" in data:
            return data["items"]
        return data.get("countries", [])
Behavior3/5

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

With no annotations provided, the description carries the full burden. It describes the return format (list with names and ISO2 codes) and hints at a read-only operation ('Get'), but does not disclose behavioral traits like rate limits, authentication needs, or potential errors. It adds basic context but lacks detailed operational guidance.

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 front-loaded with the core purpose, followed by details on returns, and structured into clear sentences without redundancy. Every sentence adds value, such as explaining the ISO2 codes' use for filtering, making it efficient and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, output schema exists), the description is mostly complete. It explains what the tool does and the return format, but with no annotations, it could benefit from more behavioral details like error handling or data freshness. The output schema likely covers return values, so the description's focus on semantics is adequate but not exhaustive.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so the description does not need to compensate. It appropriately focuses on output semantics, explaining the return content (list of countries with names and ISO2 codes), which adds value beyond the schema. The baseline for 0 parameters is 4, and the description meets this by clarifying the output.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get all WCA countries') and resource ('countries recognized by the World Cube Association'), distinguishing it from siblings like get_wca_continents or get_wca_events. It explicitly mentions the return content (names and ISO2 codes), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for obtaining country data for regional filtering, but does not explicitly state when to use this tool versus alternatives like get_wca_continents or other sibling tools. It provides clear context but lacks explicit exclusions or comparisons to other tools.

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/YuchengMaUTK/unofficial-wca-mcp-server'

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